Merge pull request #1758 from dcbaker/llvm-cpp-blacklist
LLVM cpp blacklist
This commit is contained in:
commit
ebfaf3a16f
|
@ -1635,6 +1635,7 @@ class LLVMDependency(Dependency):
|
||||||
llvmconfig = None
|
llvmconfig = None
|
||||||
_llvmconfig_found = False
|
_llvmconfig_found = False
|
||||||
__best_found = None
|
__best_found = None
|
||||||
|
__cpp_blacklist = {'-DNDEBUG'}
|
||||||
|
|
||||||
def __init__(self, environment, kwargs):
|
def __init__(self, environment, kwargs):
|
||||||
super().__init__('llvm-config', kwargs)
|
super().__init__('llvm-config', kwargs)
|
||||||
|
@ -1651,7 +1652,7 @@ class LLVMDependency(Dependency):
|
||||||
self.check_llvmconfig(req_version)
|
self.check_llvmconfig(req_version)
|
||||||
if not self._llvmconfig_found:
|
if not self._llvmconfig_found:
|
||||||
if self.__best_found is not None:
|
if self.__best_found is not None:
|
||||||
mlog.log('found {!r} but need:'.format(self.version),
|
mlog.log('found {!r} but need:'.format(self.__best_found),
|
||||||
req_version)
|
req_version)
|
||||||
else:
|
else:
|
||||||
mlog.log("No llvm-config found; can't detect dependency")
|
mlog.log("No llvm-config found; can't detect dependency")
|
||||||
|
@ -1680,7 +1681,7 @@ class LLVMDependency(Dependency):
|
||||||
p, out = Popen_safe([self.llvmconfig, '--cppflags'])[:2]
|
p, out = Popen_safe([self.llvmconfig, '--cppflags'])[:2]
|
||||||
if p.returncode != 0:
|
if p.returncode != 0:
|
||||||
raise DependencyException('Could not generate includedir for LLVM.')
|
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]
|
p, out = Popen_safe([self.llvmconfig, '--components'])[:2]
|
||||||
if p.returncode != 0:
|
if p.returncode != 0:
|
||||||
|
|
|
@ -708,7 +708,8 @@ class OrderedSet(collections.MutableSet):
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
# Don't print 'OrderedSet("")' for an empty set.
|
# Don't print 'OrderedSet("")' for an empty set.
|
||||||
if self.__container:
|
if self.__container:
|
||||||
return 'OrderedSet("{}")'.format('", "'.join(self.__container.keys()))
|
return 'OrderedSet("{}")'.format(
|
||||||
|
'", "'.join(repr(e) for e in self.__container.keys()))
|
||||||
return 'OrderedSet()'
|
return 'OrderedSet()'
|
||||||
|
|
||||||
def add(self, value):
|
def add(self, value):
|
||||||
|
@ -721,3 +722,6 @@ class OrderedSet(collections.MutableSet):
|
||||||
def update(self, iterable):
|
def update(self, iterable):
|
||||||
for item in iterable:
|
for item in iterable:
|
||||||
self.__container[item] = None
|
self.__container[item] = None
|
||||||
|
|
||||||
|
def difference(self, set_):
|
||||||
|
return type(self)(e for e in self if e not in set_)
|
||||||
|
|
Loading…
Reference in New Issue