diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2017-05-08 10:38:55 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2017-05-08 10:53:08 -0700 |
commit | f056b585a2ace2831f22023031d4ac28b9f55aea (patch) | |
tree | fcc9c87eaa4c1847c7e3ada808e9305667756c54 | |
parent | 3a688dc4b7e0a023a7654cc47c390cc88606d57f (diff) | |
download | meson-f056b585a2ace2831f22023031d4ac28b9f55aea.zip meson-f056b585a2ace2831f22023031d4ac28b9f55aea.tar.gz meson-f056b585a2ace2831f22023031d4ac28b9f55aea.tar.bz2 |
Implement a cpp blacklist for LLVM dependency
This adds a set of private flags that are removed from the output of
`llvm-config --cppflags` before storing them. This is unfortunately
necessary since some versions of LLVM include absolute garbage like
'-DNDEBUG' in their CPP flags, and we don't want to pass those.
-rw-r--r-- | mesonbuild/dependencies.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mesonbuild/dependencies.py b/mesonbuild/dependencies.py index ef7be3a..ea5660e 100644 --- a/mesonbuild/dependencies.py +++ b/mesonbuild/dependencies.py @@ -1631,6 +1631,7 @@ class LLVMDependency(Dependency): llvmconfig = None _llvmconfig_found = False __best_found = None + __cpp_blacklist = {'-DNDEBUG'} def __init__(self, environment, kwargs): super().__init__('llvm-config', kwargs) @@ -1676,7 +1677,7 @@ class LLVMDependency(Dependency): p, out = Popen_safe([self.llvmconfig, '--cppflags'])[:2] if p.returncode != 0: raise DependencyException('Could not generate includedir for LLVM.') - self.cargs = shlex.split(out) + self.cargs = list(mesonlib.OrderedSet(shlex.split(out)).difference(self.__cpp_blacklist)) p, out = Popen_safe([self.llvmconfig, '--components'])[:2] if p.returncode != 0: |