LLVM-CONFIG(1)
π
LLVM-CONFIG (the llvm-config girlies know)
okay so real talk β this is the llvm-config page from the LLVM manual, bestie. it's the little tool that prints out all the flags and libs you need so your app can actually link against LLVM. let's get into it β¨
πΈ NAME πΈ
llvm-config β prints LLVM compilation options, no cap.
π¦ SYNOPSIS π¦
llvm-config option [components...]
π DESCRIPTION π
so llvm-config literally exists to make your life easier when you're building applications that use LLVM π«Ά. it prints the compiler flags, the linker flags, and the object libraries you need to link against LLVM. that's it. that's the whole vibe. iconic honestly.
π EXAMPLES π
say you wanna link against the JIT β here's the move π :
g++ `llvm-config --cxxflags` -o HowToUseJIT.o -c HowToUseJIT.cpp
g++ `llvm-config --ldflags` -o HowToUseJIT HowToUseJIT.o \
`llvm-config --libs engine bcreader scalaropts`
β¨ OPTIONS β¨
--assertion-modeβ prints the assertion mode LLVM was built with:ONorOFF.--bindirβ prints the installation directory for LLVM binaries.--build-modeβ prints the build mode used when LLVM was built (likeDebugorRelease).--build-systemβ prints the build system used to build LLVM (likecmakeorgn).--cflagsβ prints the C compiler flags you need to use LLVM headers.--cmakedirβ prints the installation directory for LLVM CMake modules.--componentsβ prints all the valid component names. the full roster, bestie π--cppflagsβ prints the C preprocessor flags you need to use LLVM headers.--cxxflagsβ prints the C++ compiler flags you need to use LLVM headers.--has-rttiβ prints whether LLVM was built with rtti:YESorNO.--helpβ prints a summary ofllvm-configarguments. your girl when you're lost π--host-targetβ prints the target triple used to configure LLVM.--ignore-libllvmβ ignorelibLLVMand link component libraries instead.--includedirβ prints the installation directory for LLVM headers.--ldflagsβ prints the flags needed to link against LLVM libraries.--libdirβ prints the installation directory for LLVM libraries.--libfilesβ like--libs, but it prints the full path to each library file. super useful when you're making makefile dependencies, so you can make sure a tool gets relinked if any library it uses changes π--libnamesβ like--libs, but prints the bare filenames of the libraries with no-land no pathnames. great for linking against a not-yet-installed copy of LLVM.--libsβ prints all the libraries you need to link against the specified LLVM components, dependencies included. the whole friend group π--link-sharedβ link the components as shared libraries.--link-staticβ link the component libraries statically.--obj-rootβ prints the object root used to build LLVM.--prefixβ prints the installation prefix for LLVM.--shared-modeβ prints how the provided components can be collectively linked:sharedorstatic.--system-libsβ prints all the system libraries you need to link against the specified LLVM components, dependencies included.--targets-builtβ prints the component names for all targets supported by this copy of LLVM.--versionβ prints the version number of LLVM. slay π
π COMPONENTS π
wanna see every available component? just run llvm-config --components and it'll list them all for you β¨. in most cases, components map directly onto LLVM libraries. but there are these really useful "virtual" components too:
allβ includes all LLVM libraries. this is the default if you don't specify any components. lowkey the main character of components π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 π. otherwise, if an error happens, it exits with a non-zero value. so likeβ¦ vibe check your exit code, fr fr.
π«Ά Author π«Ά
maintained by the LLVM Team (https://llvm.org/). they're the ones holding it down π
β Copyright β
2003-2026, LLVM Project
and that's the whole page, bestie π
β this was LLVM-CONFIG(1), page 21, dated 2026-05-15, from the LLVM crew. go forth and link something iconic β¨π¦πΈ
π¦ where this page comes from
- fedora 44: llvm21-devel 21.1.8-5.fc44 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- fedora 44: llvm21-devel 21.1.8-5.fc44 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms