OSDN Git Service

scons: Simplified fix of llvm cxxflags for rtti
authorAlexander von Gluck IV <kallisti5@unixzen.com>
Thu, 17 Oct 2013 01:24:13 +0000 (20:24 -0500)
committerAlexander von Gluck IV <kallisti5@unixzen.com>
Fri, 18 Oct 2013 01:33:05 +0000 (20:33 -0500)
* Based on ideas of Jose Fonseca
* A rework of ce8eadb6e8

Tested-by: Vinson Lee <vlee@freedesktop.org>
scons/llvm.py

index c1c3736..8388d8e 100644 (file)
@@ -190,6 +190,11 @@ def generate(env):
                 pass
             env.MergeFlags(cppflags)
 
+            # Match llvm --fno-rtti flag
+            cxxflags = env.backtick('llvm-config --cxxflags').split()
+            if '-fno-rtti' in cxxflags:
+                env.Append(CXXFLAGS = ['-fno-rtti'])
+
             components = ['engine', 'bitwriter', 'x86asmprinter']
 
             if llvm_version >= distutils.version.LooseVersion('3.1'):