LLVM-CONFIG(1)
πΈ NAME πΈ
llvm-config β print LLVM compilation options. Bestie, welcome to the LLVM-CONFIG(1) page from the LLVM manual; this tool is lowkey the build-info queen. π
β¨ SYNOPSIS β¨
llvm-config option [components...]
π DESCRIPTION π
llvm-config makes it easier to build applications that use LLVM. It can print the compiler flags, linker flags and object libraries needed to link against LLVM. Itβs giving βpersonal assistant for your build system,β no cap. π«Ά
π«Ά EXAMPLES π«Ά
Wanna link against the JIT? Periodt, 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`
π OPTIONS π
--assertion-modeβ prints the assertion mode used when LLVM was built (ONorOFF). A literal vibe check for assertions. β¨--bindirβ prints the installation directory for LLVM binaries.--build-modeβ prints the build mode used when LLVM was built (e.g.DebugorRelease).--build-systemβ prints the build system used to build LLVM (e.g.cmakeorgn).--cflagsβ prints the C compiler flags needed to use LLVM headers.--cmakedirβ prints the installation directory for LLVM CMake modules.--componentsβ prints all valid component names. Itβs the full menu, bestie. π--cppflagsβ prints the C preprocessor flags needed to use LLVM headers.--cxxflagsβ prints the C++ compiler flags needed to use LLVM headers.--has-rttiβ prints whether or not LLVM was built with rtti (YESorNO).--helpβ prints a summary ofllvm-configarguments. When in doubt, ask for help, queen. π--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β similar to--libs, but prints the full path to each library file. This is useful when creating makefile dependencies, to ensure that a tool is relinked if any library it uses changes. Very βkeep it freshβ of it. π₯--libnamesβ similar to--libs, but prints the bare filenames of the libraries without-lor pathnames. Useful for linking against a not-yet-installed copy of LLVM.--libsβ prints all the libraries needed to link against the specified LLVM components, including any dependencies.--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 needed to link against the specified LLVM components, including any dependencies.--targets-builtβ prints the component names for all targets supported by this copy of LLVM.--versionβ prints the version number of LLVM.
π§ COMPONENTS π§
To print a list of all available components, run llvm-config --components. In most cases, components correspond directly to LLVM libraries. Useful βvirtualβ components include:
allβ includes all LLVM libraries. The default if no components are specified.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 will exit with 0. Otherwise, if an error occurs, it will exit with a non-zero value. So 0 is the slay, and non-zero is the βsomethingβs off, bestieβ moment. π
π Author π
Maintained by the LLVM Team (https://llvm.org/). Theyβre the main characters behind this whole thing. π
π Copyright π
2003-2026, LLVM Project β iconic run, honestly. π
Cute sign-off: this page is from LLVM 15, dated 2026-09-09, and itβs the LLVM-CONFIG(1) manual. Byeee π
π¦ where this page comes from
- ubuntu stonking: llvm-18 1:18.1.8-20ubuntu11 Β· APACHE-2-LLVM-EXCEPTIONS
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms