diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2017-09-25 10:33:13 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2017-09-26 13:06:22 -0700 |
commit | 95ba1fcab2d4c34b31c70b2ab9b98e4c0c43ad56 (patch) | |
tree | 17e8c163e2b6f798b766277431fc521128215d76 | |
parent | ce6099b70402e34dc2b151bd56abf2c251a372e4 (diff) | |
download | meson-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.py | 2 |
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 |