LLVM-CONFIG(1)
๐ LLVM-CONFIG(1) โ the LLVM manual, bestie edition โจ
okay so this is llvm-config from the LLVM manual, and I'm gonna walk you through it like we're texting at 2am. no gatekeeping, periodt. ๐ซถ
โจ NAME โจ
llvm-config โ literally just prints your LLVM compilation options for you ๐
๐ SYNOPSIS ๐
llvm-config option [componentsโฆ]
that's it. one option, and then optionally some components if the option wants them. iconic minimalism. ๐
๐ฆ DESCRIPTION ๐ฆ
so llvm-config is the bestie that makes building apps that use LLVM way easier. it prints the compiler flags, the linker flags, and the object libraries you need to link against LLVM. that's the whole vibe check. no cap. โจ
๐ธ EXAMPLES ๐ธ
okay so imagine you wanna link against the JIT โ here's exactly how:
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 shell-substitution slay ๐
๐ OPTIONS ๐
every single one, in order, no skips (I would never ๐):
--assertion-modeโ prints the assertion mode LLVM was built with:ONorOFF. that's the tea. ๐ฅ--bindirโ prints where the LLVM binaries live on your system. your installation directory, bestie.--build-modeโ prints the build mode LLVM was built with (likeDebugorRelease, iykyk).--build-systemโ prints what built LLVM (likecmakeorgn). the origin story. ๐ง--cflagsโ prints the C compiler flags you need to use LLVM headers.--cmakedirโ prints the installation directory for LLVM CMake modules. cmake girlies rise ๐--componentsโ prints all the valid component names. the full roster, if you will.--cppflagsโ prints the C preprocessor flags you need to use LLVM headers.--cxxflagsโ prints the C++ compiler flags you need to use LLVM headers. (yes, this one is different from--cflags, don't come for me ๐ญ)--has-rttiโ prints whether LLVM was built with rtti:YESorNO. simple as. ๐--helpโ prints a summary ofllvm-configarguments. the classic.--host-targetโ prints the target triple that configured LLVM. very "where are you from" energy.--ignore-libllvmโ ignoreslibLLVMand links component libraries instead. spicy choice โจ--includedirโ prints the installation directory for LLVM headers.--ldflagsโ prints the flags you need to link against LLVM libraries. linker bestie ๐ซถ--libdirโ prints the installation directory for LLVM libraries.--libfilesโ basically--libs, but it prints the full path to each library file instead. super useful when you're making makefile dependencies, so a tool gets relinked if any library it uses changes. lowkey underrated. ๐--libnamesโ basically--libs, but it prints the bare filenames of the libraries, no-l, no pathnames. great for linking against a not-yet-installed copy of LLVM. niche but slay.--libsโ prints all the libraries you need to link against the LLVM components you specified, dependencies included. the whole package. ๐ฆ--link-sharedโ links the components as shared libraries.--link-staticโ links the component libraries statically. (pick a lane, bestie ๐ )--obj-rootโ prints the object root used to build LLVM.--prefixโ prints the installation prefix for LLVM.--shared-modeโ prints how the components you gave 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 the targets this copy of LLVM supports.--versionโ prints the version number of LLVM. short king. ๐
๐ COMPONENTS ๐
wanna see the whole menu of available components? just run llvm-config --components. easy. ๐
in most cases, components correspond directly to LLVM libraries. but the "virtual" components are the fun ones โ useful ones include:
allโ includes all LLVM libraries. also the default if you specify no components at all. main character energy. โญbackendโ includes either a native backend or the C backend. either/or, no in-between.engineโ includes either a native JIT or the bitcode interpreter. same deal.
๐ง EXIT STATUS ๐ง
if llvm-config succeeds, it exits with 0. ๐
if an error occurs, it exits with a non-zero value. ๐ญ so check that exit code, bestie โ it's literally telling you something.
๐ Author ๐
maintained by the LLVM Team (https://llvm.org/). give them their flowers fr fr. ๐ธ
๐ Copyright ๐
2003-2026, LLVM Project
and that's the whole page, bestie โ documented and devoured. ๐ โจ
mwah, and remember: version 15, dated 2026-09-09, brought to you by the LLVM Project ๐ฆ๐
๐ฆ where this page comes from
- ubuntu stonking: llvm-17 1:17.0.6-23ubuntu10 ยท 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