LLVM-CONFIG(1)
🌸 NAME 🌸
llvm-config — Print LLVM compilation options ✨
okay so bestie, welcome to the LLVM-CONFIG(1) page from the LLVM manual 🫶 — this is the little tool that prints the compilation options you need for LLVM.
✨ 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. No cap, it's giving build-system bestie energy 💅.
🎀 EXAMPLES 🎀
To link against the JIT, here's the exact slay:
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 💖
💡 tiny heads-up: the option names below are copied exactly how this page prints 'em, with the funky dash. The examples up top show the regular -- command spelling, iykyk.
–assertion-mode— Print the assertion mode used when LLVM was built (ONorOFF).–bindir— Print the installation directory for LLVM binaries.–build-mode— Print the build mode used when LLVM was built (e.g.DebugorRelease).–build-system— Print the build system used to build LLVM (e.g.cmakeorgn).–cflags— Print the C compiler flags needed to use LLVM headers.–cmakedir— Print the installation directory for LLVM CMake modules.–components— Print all valid component names.–cppflags— Print the C preprocessor flags needed to use LLVM headers.–cxxflags— Print the C++ compiler flags needed to use LLVM headers.–has-rtti— Print whether or not LLVM was built withrtti(YESorNO).–help— Print a summary ofllvm-configarguments.–host-target— Print the target triple used to configure LLVM.–ignore-libllvm— IgnorelibLLVMand link component libraries instead.–includedir— Print the installation directory for LLVM headers.–ldflags— Print the flags needed to link against LLVM libraries.–libdir— Print the installation directory for LLVM libraries.–libfiles— Similar to–libs, but print 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.–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— Print 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— Print the object root used to build LLVM.–prefix— Print the installation prefix for LLVM.–quote-paths— Quote and escape paths when needed, most notably when a quote, space, backslash or dollar sign characters are present in the path.–shared-mode— Print how the provided components can be collectively linked (sharedorstatic).–system-libs— Print all the system libraries needed to link against the specified LLVM components, including any dependencies.–targets-built— Print the component names for all targets supported by this copy of LLVM.–version— Print 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 like, zero is the slay ending; anything else means something went off 😭.
🫶 Author 🫶
Maintained by the LLVM Team (https://llvm.org/).
👑 Copyright 👑
2003-2026, LLVM Project
mwah 💋 — this was LLVM-CONFIG(1) from LLVM version 15, dated 2026-09-15. Stay slay, bestie 🫶
📦 where this page comes from
- ubuntu stonking: llvm-22 1:22.1.8-1ubuntu1 · 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