LLVM-CONFIG(1)
π llvm-config β like, your β¨personal LLVM hype squadβ¨
okay so bestie, this is llvm-config, and it lives in the LLVM manual, and honestly? it's the friend who always knows the answer and never makes you feel dumb for asking. π«Ά
πΈ NAME πΈ
llvm-config β prints out LLVM compilation options, aka it tells you exactly what flags you need so you don't have to guess (and we do not guess, not on my watch π
).
π SYNOPSIS π
llvm-config option [components...]
like, you give it an option, you optionally give it some components, and it gives you the info. that's the whole vibe. periodt.
β¨ DESCRIPTION β¨
okay so llvm-config makes it so much easier to build applications that use LLVM, which is lowkey a lifesaver because LLVM does not come to play about flags. π
it can print the compiler flags, the linker flags, and the object libraries you need to link against LLVM. that's it, that's the job, and it does it flawlessly. π
π¦ EXAMPLES π¦
say you wanna link against the JIT, bestie β here's the whole thing, and yes you can copy it:
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 those backticks doing their little command-substitution dance. iconic. π
π OPTIONS π
here we go, the full lineup β every single one, no skips, no skimming, we don't do that here:
--assertion-modeβ prints the assertion mode used when LLVM was built, which is eitherONorOFF. simple as that.--bindirβ prints the installation directory for the LLVM binaries. π--build-modeβ prints the build mode used when LLVM was built (thinkDebugorRelease, yk how it is).--build-systemβ prints the build system used to build LLVM (likecmakeorgn, no judgment on either).--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, the whole cast. β¨--cppflagsβ prints the C preprocessor flags needed to use LLVM headers.--cxxflagsβ prints the C++ compiler flags needed to use LLVM headers. C++ girlies rise. π--has-rttiβ prints whether or not LLVM was built with rtti βYESorNO, brutally honest.--helpβ prints a summary ofllvm-configarguments. when in doubt, ask for help, we love that here. π«Ά--host-targetβ prints the target triple used to configure LLVM.--ignore-libllvmβ ignore libLLVM and link component libraries instead. boundary-setting behavior, honestly.--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 it prints the full path to each library file. super useful when you're making makefile dependencies, because it makes sure a tool gets relinked if any library it uses changes. no stale builds, no cap. π―--libnamesβ similar to--libs, but prints the bare filenames of the libraries, without-lor pathnames. great 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. the whole package.--link-sharedβ links the components as shared libraries.--link-staticβ links the component libraries statically.--obj-rootβ prints the object root used to build LLVM.--prefixβ prints the installation prefix for LLVM.--quote-pathsβ quotes and escapes paths when needed β most notably when a quote, space, backslash or dollar sign character is present in the path. those lil gremlin characters, handled. π--shared-modeβ prints how the provided components can be collectively linked, eithersharedorstatic.--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. the humble flex.
π COMPONENTS π
wanna see the whole list of available components? run llvm-config --components and it'll spill everything. π
in most cases, components correspond directly to LLVM libraries. and there are these extremely useful "virtual" components, which are giving main character energy:
allβ includes all LLVM libraries. this is the default if you don't specify any components, so if you're lazy (same) it's got you.backendβ includes either a native backend or the C backend.engineβ includes either a native JIT or the bitcode interpreter.
β EXIT STATUS β
- if
llvm-configsucceeds, it exits with0. slay. - otherwise, if an error occurs, it exits with a non-zero value. π it happens to the best of us.
π AUTHOR π
maintained by the LLVM Team (https://llvm.org/) β absolute legends, we stan. π«Ά
πΈ COPYRIGHT πΈ
2003-2026, LLVM Project
and that's the whole page bestie β page 23, dated 2026-10-06, straight from the LLVM source. go build something iconic with it π
β¨π
π¦ where this page comes from
- centos-stream 9: llvm-devel 23.1.3-1.el9 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- centos-stream 9: llvm-devel 23.1.3-1.el9 Β· 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