scons: Fix build when rtti is disabled
[mesa.git] / src / gallium / drivers / llvmpipe / SConscript
1 from sys import executable as python_cmd
2 import distutils.version
3
4 Import('*')
5
6 if not env['llvm']:
7 print 'warning: LLVM disabled: not building llvmpipe'
8 Return()
9
10 env = env.Clone()
11
12 llvmpipe = env.ConvenienceLibrary(
13 target = 'llvmpipe',
14 source = env.ParseSourceList('Makefile.sources', 'C_SOURCES')
15 )
16
17 env.Append(CXXFLAGS = env['LLVM_CXXFLAGS'])
18
19 env.Alias('llvmpipe', llvmpipe)
20
21 if not env['embedded']:
22 env = env.Clone()
23
24 env.Prepend(LIBS = [llvmpipe] + gallium)
25
26 tests = [
27 'format',
28 'blend',
29 'conv',
30 'printf',
31 ]
32
33 if not env['msvc']:
34 tests.append('arit')
35
36 for test in tests:
37 testname = 'lp_test_' + test
38 target = env.Program(
39 target = testname,
40 source = [testname + '.c', 'lp_test_main.c'],
41 )
42 env.InstallProgram(target)
43
44 # http://www.scons.org/wiki/UnitTests
45 alias = env.Alias(testname, [target], target[0].abspath)
46 AlwaysBuild(alias)
47
48 Export('llvmpipe')