opts = Options('config.py')
opts.Add(BoolOption('debug', 'build debug version', False))
opts.Add(BoolOption('dri', 'build dri drivers', False))
+opts.Add(BoolOption('llvm', 'use llvm', False))
opts.Add(EnumOption('machine', 'use machine-specific assembly code', 'x86',
allowed_values=('generic', 'x86', 'x86-64')))
# replicate options values in local variables
debug = env['debug']
dri = env['dri']
+llvm = env['llvm']
machine = env['machine']
# derived options
'debug',
'x86',
'dri',
+ 'llvm',
'platform',
'gcc',
'msvc',
'GLX_INDIRECT_RENDERING',
])
+# LLVM
+if llvm:
+ # See also http://www.scons.org/wiki/UsingPkgConfig
+ env.ParseConfig('llvm-config --cflags --ldflags --libs')
+ env.Append(CPPDEFINES = ['MESA_LLVM'])
+ env.Append(CXXFLAGS = ['-Wno-long-long'])
+
+
# libGL
if 1:
env.Append(LIBS = [
build_subdir = platform
if dri:
build_subdir += "-dri"
+if llvm:
+ build_subdir += "-llvm"
if x86:
build_subdir += "-x86"
if debug:
'auxiliary/tgsi/SConscript',
'auxiliary/cso_cache/SConscript',
'auxiliary/draw/SConscript',
- #'auxiliary/gallivm/SConscript',
'auxiliary/pipebuffer/SConscript',
+])
+
+if llvm:
+ SConscript(['auxiliary/gallivm/SConscript'])
+SConscript([
'drivers/softpipe/SConscript',
'drivers/i915simple/SConscript',
'drivers/i965simple/SConscript',