LLVM-CONFIG(1)
π NAME π
llvm-config β bestie, it prints your LLVM compilation options. That's it. That's the whole job. And it slays at it.
β¨ SYNOPSIS β¨
llvm-config option [components...]
π¦ DESCRIPTION π¦
Okay so real talk: llvm-config is the friend who makes building apps that use LLVM actually possible. Like, you could hand-hunt all the flags yourself, but why would you π. It prints the compiler flags, the linker flags, and the object libraries you need to link against LLVM. That's the whole vibe. It's giving "personal assistant but for your build system."
πΈ EXAMPLES πΈ
Say you wanna link against the JIT (iconic behaviour, honestly):
g++ `llvm-config --cxxflags` -o HowToUseJIT.o -c HowToUseJIT.cpp
g++ `llvm-config --ldflags` -o HowToUseJIT HowToUseJIT.o \
`llvm-config --libs engine bcreader scalaropts`
See how it's just vibing inside backticks? That's the move. No cap.
π OPTIONS π
--versionβ prints the version number of LLVM. The receipts. π-helpβ prints a lil summary of all thellvm-configarguments, for when you forgot what you were doing (relatable).--prefixβ prints the installation prefix for LLVM. Where it lives. Its address. π--src-rootβ prints the source root that LLVM was built from.--obj-rootβ prints the object root used to build LLVM.--bindirβ prints the installation directory for LLVM binaries.--includedirβ prints the installation directory for LLVM headers.--libdirβ prints the installation directory for LLVM libraries.--cxxflagsβ prints the C++ compiler flags you need to use LLVM headers. Feed this straight to your compiler, bestie.--ldflagsβ prints the flags needed to link against LLVM libraries.--libsβ prints all the libraries needed to link against the LLVM components you specified, dependencies included. The whole friend group, not just the main characters. π--libnamesβ basically--libsbut it prints the bare filenames of the libraries, no-l, no pathnames. Super useful when you're linking against a not-yet-installed copy of LLVM. π£--libfilesβ again like--libs, but it prints the full path to each library file. Genuinely clutch when you're writing makefile dependencies, because it makes sure a tool gets relinked if any library it uses changes. Dependency brain. π§--componentsβ prints every valid component name. The guest list. π--targets-builtβ prints the component names for all targets supported by this copy of LLVM.--build-modeβ prints the build mode used when LLVM was built (likeDebugorRelease). It tells you what energy LLVM was built with. π₯
π COMPONENTS π
Wanna see every available component? Run:
llvm-config --components
In most cases, components correspond directly to LLVM libraries β one-to-one, no drama. But there are some "virtual" components that are lowkey iconic:
allβ includes all LLVM libraries. This is the default if you don't specify any components, so if you're lazy (valid), you already get this. π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, it exits with 0. Slay. If an error happens, it exits with a non-zero value. Not slay, but at least it's honest. π
π AUTHOR π
Maintained by the LLVM Team (https://llvm.org/). The collective. The group chat. The ones holding it down. β¨
π COPYRIGHT π
2003-2024, LLVM Project
And that's the whole page, bestie β this was LLVM manual page for llvm-config, dated 2024-07-18, stamped with version 11, and yes I'm signing off because you read the entire thing and that's main character energy fr fr π¦β¨π
π¦ where this page comes from
- fedora 43: llvm11-devel 11.1.0-14.fc41 Β· NCSA
- fedora 43: llvm11-devel 11.1.0-14.fc41 Β· NCSA
- fedora 44: llvm11-devel 11.1.0-14.fc41 Β· NCSA
- fedora 44: llvm11-devel 11.1.0-14.fc41 Β· NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms