aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2017-09-25 10:33:13 -0700
committerDylan Baker <dylan@pnwbakers.com>2017-09-26 13:06:22 -0700
commit95ba1fcab2d4c34b31c70b2ab9b98e4c0c43ad56 (patch)
tree17e8c163e2b6f798b766277431fc521128215d76
parentce6099b70402e34dc2b151bd56abf2c251a372e4 (diff)
downloadmeson-95ba1fcab2d4c34b31c70b2ab9b98e4c0c43ad56.zip
meson-95ba1fcab2d4c34b31c70b2ab9b98e4c0c43ad56.tar.gz
meson-95ba1fcab2d4c34b31c70b2ab9b98e4c0c43ad56.tar.bz2
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.
-rw-r--r--mesonbuild/dependencies/dev.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py
index fb27721..f4f4306 100644
--- a/mesonbuild/dependencies/dev.py
+++ b/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