deps: convert LLVM modules to a set before checking for them

This allows the logic in a meson.build file to be simplified (ie, some
dependencies can add the same module requirements) but meson will only
check for them once. Since set is inherently unordered, use sorted to
make the output deterministic.
pull/2378/head
Dylan Baker 7 years ago
parent ce6099b704
commit 95ba1fcab2
  1. 2
      mesonbuild/dependencies/dev.py

@ -183,7 +183,7 @@ class LLVMDependency(ExternalDependency):
self.modules = shlex.split(out)
modules = mesonlib.stringlistify(mesonlib.flatten(kwargs.get('modules', [])))
for mod in modules:
for mod in sorted(set(modules)):
if mod not in self.modules:
mlog.log('LLVM module', mod, 'found:', mlog.red('NO'))
self.is_found = False

Loading…
Cancel
Save