1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 14:22:07 +02:00
tldr/pages/common/llvm-config.md
2021-09-14 11:28:59 +02:00

17 lines
565 B
Markdown

# llvm-config
> Get various configuration information needed to compile programs which use LLVM.
> Typically called from build systems, like in Makefiles or configure scripts.
> More information: <https://llvm.org/docs/CommandGuide/llvm-config.html>.
- Compile and link an LLVM based program:
`clang++ $(llvm-config --cxxflags --ldflags --libs) --output {{path/to/output_executable}} {{path/to/source.cc}}`
- Print the `PREFIX` of your LLVM installation:
`llvm-config --prefix`
- Print all targets supported by your LLVM build:
`llvm-config --targets-built`