LLVM-CONFIG(1)
π LLVM-CONFIG(1) π
okay bestie, welcome to the llvm-config page β that's the LLVM manual, section 1, and she's here to spill all the compiler tea ββ¨
β¨ NAME β¨
llvm-config β prints out all your LLVM compilation options, no cap π«Ά
πΈ SYNOPSIS πΈ
llvm-config option [components...]
π¦ DESCRIPTION π¦
So like, llvm-config is literally the bestie that makes building apps on top of LLVM so much easier π
. She will print you the compiler flags, the linker flags, and the object libraries you need to link against LLVM. That's it. That's the whole job. And she ate. π₯
π EXAMPLES π
Say you wanna link against the JIT β here's the vibe:
g++ `llvm-config --cxxflags` -o HowToUseJIT.o -c HowToUseJIT.cpp
g++ `llvm-config --ldflags` -o HowToUseJIT HowToUseJIT.o \
`llvm-config --libs engine bcreader scalaropts`
look at her go, backtick substitution queen π
π OPTIONS π
--assertion-modeβ tells you the assertion mode LLVM was built with, eitherONorOFFπ«‘--bindirβ prints where the LLVM binaries live on your system π--build-modeβ what build mode was LLVM built with? likeDebugorReleaseand such π--build-systemβ prints the build system that built LLVM, e.g.cmakeorgnπ οΈ--cflagsβ the C compiler flags you need to use LLVM's headers π--cmakedirβ where the LLVM CMake modules got installed π--componentsβ prints every single valid component name, the whole roster π--cppflagsβ the C preprocessor flags you need for LLVM's headers π§--cxxflagsβ the C++ compiler flags you need for LLVM's headers β¨--has-rttiβ was LLVM built with rtti or not? answersYESorNO, no in-between π--helpβ a lil summary of all thellvm-configarguments, your cheat sheet π--host-targetβ the target triple that configured LLVM π―--ignore-libllvmβ skiplibLLVMand link the component libraries instead π--includedirβ where the LLVM headers got installed π--ldflagsβ the flags you need to link against LLVM libraries π--libdirβ where the LLVM libraries got installed ποΈ--libfilesβ basically--libsbut it prints the full path to every library file. super useful for makefile dependencies, so a tool gets relinked whenever any library it uses changes π--libnamesβ also like--libsbut it prints just the bare filenames, no-land no pathnames. perfect when you're linking against a copy of LLVM that isn't installed yet π£--libsβ every library you need to link against the components you asked for, dependencies included π--link-sharedβ link those components as shared libraries π--link-staticβ link the component libraries statically π§±--obj-rootβ the object root used to build LLVM ποΈ--prefixβ the installation prefix for LLVM π--shared-modeβ prints how the components you gave her can be linked together as a group (sharedorstatic) π€--system-libsβ all the system libraries needed to link against your components, dependencies included π₯οΈ--targets-builtβ the component names of every target this copy of LLVM supports π--versionβ the LLVM version number, obviously π
π COMPONENTS π
Wanna see every available component? just run llvm-config --components and she'll list them all for you π«Ά
Most of the time components map directly onto LLVM libraries. But there are some "virtual" components that are lowkey iconic:
allβ includes every LLVM library. this is the default if you don't name any components at all π«backendβ includes either a native backend or the C backend π§engineβ includes either a native JIT or the bitcode interpreter βοΈ
π¦ EXIT STATUS π¦
If llvm-config succeeds, she exits with 0 β slay π
Otherwise, if an error happens, she exits with a non-zero value π
π AUTHOR π
Maintained by the LLVM Team (https://llvm.org/). icons only.
π COPYRIGHT π
2003-2025, LLVM Project
and that's the whole page bestie!! this one's llvm-config from the LLVM manual, page 20, dated 2025-09-03 β mwah, go build something gorgeous π
β¨π¦
π¦ where this page comes from
- fedora 43: llvm20-devel 20.1.8-2.fc43 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- fedora 43: llvm20-devel 20.1.8-2.fc43 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- fedora 44: llvm20-devel 20.1.8-2.fc44 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- fedora 44: llvm20-devel 20.1.8-2.fc44 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms