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

Install

All systems
curl cmd.cat/llvm-config.sh
Debian Debian
apt-get install llvm-3.0
Ubuntu
apt-get install llvm-8
Arch Arch Linux
pacman -S llvm6
image/svg+xml Kali Linux
apt-get install llvm-7
Fedora
dnf install llvm4.0-devel
Windows (WSL2)
sudo apt-get update sudo apt-get install llvm-8
OS X
brew install llvm@6
Raspbian
apt-get install llvm-3.2

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

© tl;dr; authors and contributors