scons: Fix build when rtti is disabled

* The rtti fix actually dug up a bug in the scons build scripts.
* Autotools took the LLVM cpp and cxx flags, while scons only took
  the cpp flags.
* This grabs the cxx flags and applies them where needed. We may
  want to make the same change for the llvm cpp flags in scons.
* The only linux platform I can find with LLVM no-rtti is Ubuntu.
* Fixes bug #70471

Tested-by: Vinson Lee <vlee@freedesktop.org>
This commit is contained in:
Alexander von Gluck IV 2013-10-15 12:08:59 -05:00
parent 85d7f6779f
commit 94d05bf87a
3 changed files with 10 additions and 4 deletions

View file

@ -190,6 +190,9 @@ def generate(env):
pass
env.MergeFlags(cppflags)
cxxflags = env.backtick('llvm-config --cxxflags').rstrip()
env.Append(LLVM_CXXFLAGS = cxxflags)
components = ['engine', 'bitwriter', 'x86asmprinter']
if llvm_version >= distutils.version.LooseVersion('3.1'):

View file

@ -46,6 +46,8 @@ source = env.ParseSourceList('Makefile.sources', [
])
if env['llvm']:
env.Append(CXXFLAGS = env['LLVM_CXXFLAGS'])
source += env.ParseSourceList('Makefile.sources', [
'GALLIVM_SOURCES',
'GALLIVM_CPP_SOURCES'

View file

@ -10,13 +10,14 @@ if not env['llvm']:
env = env.Clone()
llvmpipe = env.ConvenienceLibrary(
target = 'llvmpipe',
source = env.ParseSourceList('Makefile.sources', 'C_SOURCES')
)
target = 'llvmpipe',
source = env.ParseSourceList('Makefile.sources', 'C_SOURCES')
)
env.Append(CXXFLAGS = env['LLVM_CXXFLAGS'])
env.Alias('llvmpipe', llvmpipe)
if not env['embedded']:
env = env.Clone()