Files
tldr/pages.zh/common/llvm-config.md

17 lines
529 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# llvm-config
> 获取编译使用 LLVM 的程序所需的各种配置信息。
> 通常在构建系统中调用,如 Makefile 或配置脚本。
> 更多信息:<https://llvm.org/docs/CommandGuide/llvm-config.html>。
- 编译和链接一个基于 LLVM 的程序:
`clang++ $(llvm-config --cxxflags --ldflags --libs) --output {{path/to/output_executable}} {{path/to/source.cc}}`
- 打印您 LLVM 安装的 `PREFIX`
`llvm-config --prefix`
- 打印您 LLVM 构建支持的所有目标:
`llvm-config --targets-built`