aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2020-01-30 13:32:33 -0800
committerGitHub <noreply@github.com>2020-01-30 23:32:33 +0200
commitd67271e1a6e34b1da82e47521730dff9d0e5e36a (patch)
tree7c88045a47ca222649148cbb910da36eb25dfd75
parent5d9bc3b324d59122071fbaa92de811d4c646d3cc (diff)
downloadmeson-d67271e1a6e34b1da82e47521730dff9d0e5e36a.zip
meson-d67271e1a6e34b1da82e47521730dff9d0e5e36a.tar.gz
meson-d67271e1a6e34b1da82e47521730dff9d0e5e36a.tar.bz2
Small cleanups for the LLVM dependency class (#6548)
-rw-r--r--docs/markdown/Dependencies.md2
-rw-r--r--mesonbuild/dependencies/dev.py7
2 files changed, 8 insertions, 1 deletions
diff --git a/docs/markdown/Dependencies.md b/docs/markdown/Dependencies.md
index d21bb97..cf2744f 100644
--- a/docs/markdown/Dependencies.md
+++ b/docs/markdown/Dependencies.md
@@ -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.
diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py
index 4bec71a..4cefd75 100644
--- a/mesonbuild/dependencies/dev.py
+++ b/mesonbuild/dependencies/dev.py
@@ -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