Mesa (master): gallium: always build drivers/sw
Joakim Sindholt
jsindholt at kemper.freedesktop.org
Sat Jun 5 15:19:59 UTC 2010
Module: Mesa
Branch: master
Commit: fb08e03ae1d43e668b85a5673253353aa59bebad
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fb08e03ae1d43e668b85a5673253353aa59bebad
Author: Joakim Sindholt <opensource at zhasha.com>
Date: Sat Jun 5 16:53:38 2010 +0200
gallium: always build drivers/sw
---
SConstruct | 2 ++
src/gallium/drivers/sw/SConscript | 16 +++++++++-------
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/SConstruct b/SConstruct
index 1c8a00c..76ada41 100644
--- a/SConstruct
+++ b/SConstruct
@@ -136,6 +136,8 @@ if 'softpipe' not in env['drivers']:
env['drivers'].append('softpipe')
if env['llvm'] and 'llvmpipe' not in env['drivers']:
env['drivers'].append('llvmpipe')
+if 'sw' not in env['drivers']:
+ env['drivers'].append('sw')
# Includes
env.Prepend(CPPPATH = [
diff --git a/src/gallium/drivers/sw/SConscript b/src/gallium/drivers/sw/SConscript
index 37d0a0d..e9ebf75 100644
--- a/src/gallium/drivers/sw/SConscript
+++ b/src/gallium/drivers/sw/SConscript
@@ -5,32 +5,34 @@
# rasterizers into a single driver. A software rasterizer is defined
# as any driver which takes an sw_winsys pointer as the only argument
# to create_screen.
-#
-# XXX: unfortunately users of this driver still need to link in any
-# extra libraries needed for the particular driver (eg llvm for
-# llvmpipe). Not sure how to get around this.
Import('*')
env = env.Clone()
+# To avoid targets having to check extensively or add drivers on a whim, append
+# all referenced extra drivers to the exported symbol.
+extra = []
if True:
env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE')
env.Prepend(LIBS = [softpipe])
+ extra.append(softpipe)
if env['llvm']:
env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
env.Tool('udis86')
env.Prepend(LIBS = [llvmpipe])
-
+ extra.append(llvmpipe)
+
if 'cell' in env['drivers']:
env.Append(CPPDEFINES = 'GALLIUM_CELL')
env.Prepend(LIBS = [cell])
+ extra.append(cell)
sw = env.ConvenienceLibrary(
target = 'sw',
source = [
'sw.c',
]
- )
- Export('sw')
+ ) + extra
+Export('sw')
More information about the mesa-commit
mailing list