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: ON or OFF. 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 (like Debug or Release, iykyk).
  • --build-system โ€” prints what built LLVM (like cmake or gn). 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: YES or NO. simple as. ๐Ÿ’€
  • --help โ€” prints a summary of llvm-config arguments. the classic.
  • --host-target โ€” prints the target triple that configured LLVM. very "where are you from" energy.
  • --ignore-libllvm โ€” ignores libLLVM and 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: shared or static.
  • --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. ๐ŸŒธ


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