← 返回命令列表

Linux command

llvm-config 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Show LLVM version

llvm-config --version

Show compiler flags

llvm-config --cxxflags

Show linker flags

llvm-config --ldflags

Show library names

llvm-config --libs

Show flags for specific components

llvm-config --cxxflags --ldflags --libs core

Show installation prefix

llvm-config --prefix

说明

llvm-config provides configuration information for building against LLVM. Outputs compiler flags, linker flags, and library names needed to compile and link programs using LLVM libraries.

参数

--version
Print LLVM version.
--prefix
Print installation prefix.
--cxxflags
Print C++ compiler flags.
--ldflags
Print linker flags.
--libs
Print library names.
--system-libs
Print system library names.
--components
Print available components.
--targets-built
Print available targets.

FAQ

What is the llvm-config command used for?

llvm-config provides configuration information for building against LLVM. Outputs compiler flags, linker flags, and library names needed to compile and link programs using LLVM libraries.

How do I run a basic llvm-config example?

Run `llvm-config --version` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does --version do in llvm-config?

Print LLVM version.