diff options
author | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-02-19 10:50:39 +0900 |
---|---|---|
committer | José Fonseca <jrfonseca@tungstengraphics.com> | 2008-02-19 14:01:49 +0900 |
commit | e773a813cf475e2a7ad79ea1ec698bf2530d0433 (patch) | |
tree | 0678d21df2276069a588399e3becf1689030ed39 /SConstruct | |
parent | e279b1c57ac8d17703d80f1b644fd1d4f115101b (diff) |
Initial scons support to build gallivm.
Not yet complete.
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct index 4fb51f2e6d..b20f88a303 100644 --- a/SConstruct +++ b/SConstruct @@ -32,6 +32,7 @@ import sys 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'))) @@ -55,6 +56,7 @@ else: # replicate options values in local variables debug = env['debug'] dri = env['dri'] +llvm = env['llvm'] machine = env['machine'] # derived options @@ -66,6 +68,7 @@ Export([ 'debug', 'x86', 'dri', + 'llvm', 'platform', 'gcc', 'msvc', @@ -159,6 +162,14 @@ if dri: '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 = [ @@ -214,6 +225,8 @@ build_topdir = 'build' build_subdir = platform if dri: build_subdir += "-dri" +if llvm: + build_subdir += "-llvm" if x86: build_subdir += "-x86" if debug: |