scons: Add -fno-rtti to CXXFLAGS with llvm-3.2.
authorVinson Lee <vlee@freedesktop.org>
Sat, 27 Oct 2012 20:10:28 +0000 (13:10 -0700)
committerVinson Lee <vlee@freedesktop.org>
Sun, 28 Oct 2012 18:31:25 +0000 (11:31 -0700)
llvm-3.2svn r166772 no longer requires RTTI for lib/Support.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
scons/llvm.py

index f87766af1906d5f067148a752de6d1c3184ae911..e1ed7602211a697ec29c94e23d50e31eddd88978 100644 (file)
@@ -183,6 +183,9 @@ def generate(env):
             if llvm_version >= distutils.version.LooseVersion('3.1'):
                 components.append('mcjit')
 
+            if llvm_version >= distutils.version.LooseVersion('3.2'):
+                env.Append(CXXFLAGS = ('-fno-rtti',))
+
             env.ParseConfig('llvm-config --libs ' + ' '.join(components))
             env.ParseConfig('llvm-config --ldflags')
         except OSError: