summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2009-09-01 12:22:52 +0100
committerJosé Fonseca <[email protected]>2009-09-01 12:26:00 +0100
commit836a9f0ae6e03d2f92dc024703015c25a5b3c353 (patch)
treeabd23ae2cd70c8f5620f51be0a2fd6276aebdde2 /src/gallium
parent8c3f622a34fd9ecebbe3562aa803780bf1c82c9f (diff)
scons: Tool for LLVM. Gracefully disable llvmpipe if LLVM not found.
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/llvmpipe/SConscript8
-rw-r--r--src/gallium/winsys/xlib/SConscript12
2 files changed, 11 insertions, 9 deletions
diff --git a/src/gallium/drivers/llvmpipe/SConscript b/src/gallium/drivers/llvmpipe/SConscript
index 6bceb84da47..5c29bdac56e 100644
--- a/src/gallium/drivers/llvmpipe/SConscript
+++ b/src/gallium/drivers/llvmpipe/SConscript
@@ -2,8 +2,12 @@ Import('*')
env = env.Clone()
+env.Tool('llvm')
+if 'LLVM_VERSION' not in env:
+ print 'warning: LLVM not found: not building llvmpipe'
+ Return()
+
env.Tool('udis86')
-env.ParseConfig('llvm-config --cppflags')
llvmpipe = env.ConvenienceLibrary(
target = 'llvmpipe',
@@ -57,8 +61,6 @@ llvmpipe = env.ConvenienceLibrary(
env = env.Clone()
-env['LINK'] = env['CXX']
-env.ParseConfig('llvm-config --libs jit interpreter nativecodegen bitwriter')
env.Prepend(LIBS = [llvmpipe] + auxiliaries)
env.Program(
diff --git a/src/gallium/winsys/xlib/SConscript b/src/gallium/winsys/xlib/SConscript
index 518fd2b5a84..467d595d33b 100644
--- a/src/gallium/winsys/xlib/SConscript
+++ b/src/gallium/winsys/xlib/SConscript
@@ -30,12 +30,12 @@ if env['platform'] == 'linux' \
drivers += [softpipe]
if 'llvmpipe' in env['drivers']:
- env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
- env.Tool('udis86')
- env.ParseConfig('llvm-config --libs jit interpreter nativecodegen')
- env['LINK'] = env['CXX']
- sources += ['xlib_llvmpipe.c']
- drivers += [llvmpipe]
+ env.Tool('llvm')
+ if 'LLVM_VERSION' in env:
+ env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
+ env.Tool('udis86')
+ sources += ['xlib_llvmpipe.c']
+ drivers += [llvmpipe]
if 'i965simple' in env['drivers']:
env.Append(CPPDEFINES = 'GALLIUM_I965SIMPLE')