aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/dependencies/dev.py
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2019-04-02 10:40:17 +0200
committerDaniel Mensinger <daniel@mensinger-ka.de>2019-05-03 01:39:16 +0200
commit3f539e01aedd1a3498c341efadb591a8a90e6995 (patch)
tree840319877d3f1dfa07783e01a119bb27a2f21b81 /mesonbuild/dependencies/dev.py
parent6a2faacdf9e5dff25c7a467d102811e3e7d1cf08 (diff)
downloadmeson-3f539e01aedd1a3498c341efadb591a8a90e6995.zip
meson-3f539e01aedd1a3498c341efadb591a8a90e6995.tar.gz
meson-3f539e01aedd1a3498c341efadb591a8a90e6995.tar.bz2
cmake: revert module name mapping
Diffstat (limited to 'mesonbuild/dependencies/dev.py')
-rw-r--r--mesonbuild/dependencies/dev.py20
1 files changed, 12 insertions, 8 deletions
diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py
index deb7ef1..2ad506e 100644
--- a/mesonbuild/dependencies/dev.py
+++ b/mesonbuild/dependencies/dev.py
@@ -405,6 +405,7 @@ class LLVMDependencyCMake(CMakeDependency):
def __init__(self, env, kwargs):
self.llvm_modules = stringlistify(extract_as_list(kwargs, 'modules'))
self.llvm_opt_modules = stringlistify(extract_as_list(kwargs, 'optional_modules'))
+ self.module_map = {}
super().__init__(name='LLVM', environment=env, language='cpp', kwargs=kwargs)
# Extract extra include directories and definitions
@@ -422,19 +423,22 @@ class LLVMDependencyCMake(CMakeDependency):
'-DLLVM_MESON_OPT_MODULES={}'.format(';'.join(self.llvm_opt_modules))]
def _map_module_list(self, modules: List[Tuple[str, bool]]) -> List[Tuple[str, bool]]:
- modules = [(x, True) for x in self.get_cmake_var('MESON_RESOLVED_LLVM_MODULES')]
- modules += [(x, False) for x in self.get_cmake_var('MESON_RESOLVED_LLVM_MODULES_OPT')]
+ res_modules = self.get_cmake_var('MESON_RESOLVED_LLVM_MODULES')
+ res_opt_modules = self.get_cmake_var('MESON_RESOLVED_LLVM_MODULES_OPT')
+ modules = [(x, True) for x in res_modules]
+ modules += [(x, False) for x in res_opt_modules]
+ self.module_map = {
+ **dict(zip(res_modules, self.llvm_modules)),
+ **dict(zip(res_opt_modules, self.llvm_opt_modules))
+ }
return modules
+ def _original_module_name(self, module: str) -> str:
+ return self.module_map.get(module, module)
+
def need_threads(self) -> bool:
return True
- def log_details(self) -> str:
- modules = self.get_cmake_var('MESON_RESOLVED_LLVM_MODULES')
- if modules:
- return 'modules: ' + ', '.join(modules)
- return ''
-
class LLVMDependency(ExternalDependency):
def __init__(self, env, kwargs):
super().__init__('LLVM', env, 'cpp', kwargs)