From 95ba1fcab2d4c34b31c70b2ab9b98e4c0c43ad56 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Mon, 25 Sep 2017 10:33:13 -0700 Subject: [PATCH] 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. --- mesonbuild/dependencies/dev.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py index fb27721b2..f4f430631 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