Skip to content

Commit

Permalink
Small cleanups for the LLVM dependency class (mesonbuild#6548)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcbaker authored Jan 30, 2020
1 parent 5d9bc3b commit d67271e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/markdown/Dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 6 additions & 1 deletion mesonbuild/dependencies/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ def __init__(self, name: str, environment, kwargs):
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'))
Expand Down Expand Up @@ -392,6 +391,12 @@ def __init__(self, name: str, env, kwargs):
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

Expand Down

0 comments on commit d67271e

Please sign in to comment.