path: root/
diff options
authorJosé Fonseca <>2010-04-10 02:41:39 +0100
committerJosé Fonseca <>2010-04-11 17:17:34 +0900
commitea532f0e725bd68e7784189c9b7f6f7bf7f9d901 (patch)
tree1b318d82380b08fb3f602597b61d797a2f5656bd /
parent9fc93b80413d63aeb08b5a17602d111ed3899faf (diff)
scons: Make LLVM a black-white dependency.
Now that draw depends on llvm it is very difficult to correctly handle broken llvm installations. Either the user requests LLVM and it needs to supply a working installation. Or it doesn't, and it gets no LLVM accelerate pipe drivers.
Diffstat (limited to '')
1 files changed, 7 insertions, 1 deletions
diff --git a/ b/
index 97389ed5001..4b6960c66c8 100644
--- a/
+++ b/
@@ -3,6 +3,7 @@
import os
import os.path
+import subprocess
import sys
import platform as _platform
@@ -33,6 +34,11 @@ else:
default_machine = _platform.machine()
default_machine = _machine_map.get(default_machine, 'generic')
+if 'LLVM' in os.environ or['llvm-config', '--version'], stdout=subprocess.PIPE) == 0:
+ default_llvm = 'yes'
+ default_llvm = 'no'
if default_platform in ('linux', 'freebsd'):
default_dri = 'yes'
elif default_platform in ('winddk', 'windows', 'wince', 'darwin'):
@@ -61,5 +67,5 @@ def AddOptions(opts):
opts.Add(EnumOption('platform', 'target platform', default_platform,
allowed_values=('linux', 'cell', 'windows', 'winddk', 'wince', 'darwin', 'embedded')))
opts.Add('toolchain', 'compiler toolchain', 'default')
- opts.Add(BoolOption('llvm', 'use LLVM', 'no'))
+ opts.Add(BoolOption('llvm', 'use LLVM', default_llvm))
opts.Add(BoolOption('dri', 'build DRI drivers', default_dri))