diff options
author | José Fonseca <jfonseca@vmware.com> | 2011-07-11 15:36:40 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2011-07-11 15:38:06 +0100 |
commit | acf82194ce4383308d1e8939d1778594bf5547c5 (patch) | |
tree | 1313122e45822482354c7d7fd1f201b5daf3138c /scons/llvm.py | |
parent | d60880db35fd11d9348ce4b2bfbcc9325d2ebf91 (diff) |
scons: Filter-out NDEBUG define from llvm-config.
Based on a similar autoconf change from Marek.
Diffstat (limited to 'scons/llvm.py')
-rw-r--r-- | scons/llvm.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/scons/llvm.py b/scons/llvm.py index b89899bbf8..66f972df5f 100644 --- a/scons/llvm.py +++ b/scons/llvm.py @@ -141,7 +141,15 @@ def generate(env): llvm_version = distutils.version.LooseVersion(llvm_version) try: - env.ParseConfig('llvm-config --cppflags') + # Treat --cppflags specially to prevent NDEBUG from disabling + # assertion failures in debug builds. + cppflags = env.ParseFlags('!llvm-config --cppflags') + try: + cppflags['CPPDEFINES'].remove('NDEBUG') + except ValueError: + pass + env.MergeFlags(cppflags) + env.ParseConfig('llvm-config --libs') env.ParseConfig('llvm-config --ldflags') except OSError: |