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: ON or OFF.
  • --bindir β€” prints the installation directory for LLVM binaries.
  • --build-mode β€” prints the build mode used when LLVM was built (like Debug or Release).
  • --build-system β€” prints the build system used to build LLVM (like cmake or gn).
  • --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: YES or NO.
  • --help β€” prints a summary of llvm-config arguments. your girl when you're lost πŸ™ˆ
  • --host-target β€” prints the target triple used to configure LLVM.
  • --ignore-libllvm β€” ignore libLLVM and 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 -l and 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: 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 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 πŸ’–

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