llvm-config

provides configuration information for building against LLVM

TLDR

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

SYNOPSIS

llvm-config [options] [components...]

DESCRIPTION

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.

PARAMETERS

--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.

INSTALL

sudo apt install llvm
sudo dnf install llvm
sudo pacman -S llvm
sudo apk add llvm-dev
sudo zypper install llvm
brew install llvm
nix profile install nixpkgs#llvm

SEE ALSO

clang(1), llc(1)