Small cleanups for the LLVM dependency class (#6548)

pull/6556/head
Dylan Baker 5 years ago committed by GitHub
parent 5d9bc3b324
commit d67271e1a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      docs/markdown/Dependencies.md
  2. 7
      mesonbuild/dependencies/dev.py

@ -370,6 +370,8 @@ As of 0.44.0 Meson supports the `static` keyword argument for
LLVM. Before this LLVM >= 3.9 would always dynamically link, while
older versions would statically link, due to a quirk in `llvm-config`.
`method` may be `auto`, `config-tool`, or `cmake`.
### Modules, a.k.a. Components
Meson wraps LLVM's concept of components in it's own modules concept.

@ -218,7 +218,6 @@ class LLVMDependencyConfigTool(ConfigToolDependency):
self.module_details = []
if not self.is_found:
return
self.static = kwargs.get('static', False)
self.provided_modules = self.get_config_value(['--components'], 'modules')
modules = stringlistify(extract_as_list(kwargs, 'modules'))
@ -392,6 +391,12 @@ class LLVMDependencyCMake(CMakeDependency):
self.llvm_opt_modules = stringlistify(extract_as_list(kwargs, 'optional_modules'))
super().__init__(name, env, kwargs, language='cpp')
# Cmake will always create a statically linked binary, so don't use
# cmake if dynamic is required
if not self.static:
self.is_found = False
return
if self.traceparser is None:
return

Loading…
Cancel
Save