docs: add LLVM tool section to dependencies [skip ci]

This commit is contained in:
Gerion Entrup 2020-04-04 12:36:03 +02:00 committed by GitHub
parent 2cfbb36a84
commit 2cefe8fd41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -395,6 +395,17 @@ llvm_dep = dependency(
)
```
### Using LLVM tools
When using LLVM as library but also needing its tools, it is often beneficial to use the same version.
This can partially be achieved with the `version` argument of `find_program()`.
However, distributions tend to package different LLVM versions in rather different ways.
Therefore, it is often better to use the llvm dependency directly to retrieve the tools:
```meson
llvm_dep = dependency('llvm', version : ['>= 8', '< 9'])
llvm_link = find_program(llvm_dep.get_variable(configtool: 'bindir') / 'llvm-link')
```
## MPI
*(added 0.42.0)*