LLVM-CONFIG(1)

πŸ’– NAME πŸ’–

okay so welcome to LLVM-CONFIG(1), bestie β€” this is llvm-config, the CLI that prints LLVM compilation options. It’s giving β€œbuild-system wingwoman” and honestly? iconic. 🫢

✨ SYNOPSIS ✨

llvm-config option [components…]

🌸 DESCRIPTION 🌸

llvm-config makes building applications that use LLVM way easier. It can print the compiler flags, linker flags, and object libraries you need to link against LLVM. Literally the β€œhere’s what you need to link, no cap” bestie. πŸ’…

πŸ¦‹ EXAMPLES πŸ¦‹

To link against the JIT, you’d do this cute little two-step:

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 used when LLVM was built (ON or OFF). ✨
  • --bindir β€” prints the installation directory for LLVM binaries.
  • --build-mode β€” prints the build mode used when LLVM was built (e.g. Debug or Release).
  • --build-system β€” prints the build system used to build LLVM (e.g. cmake or gn).
  • --cflags β€” prints the C compiler flags needed to use LLVM headers.
  • --cmakedir β€” prints the installation directory for LLVM CMake modules.
  • --components β€” prints all valid component names. the ultimate roster reveal πŸŽ€
  • --cppflags β€” prints the C preprocessor flags needed to use LLVM headers.
  • --cxxflags β€” prints the C++ compiler flags needed to use LLVM headers.
  • --has-rtti β€” prints whether or not LLVM was built with rtti (YES or NO).
  • --help β€” prints a summary of llvm-config arguments. bestie behavior.
  • --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 β€” similar to --libs, but prints 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 -l or pathnames. Useful 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 main character of link flags, fr fr
  • --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).
  • --src-root β€” prints the source root from which LLVM was built.
  • --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.

πŸŽ€ 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. zero is the slay outcome, bestie. πŸ’€

πŸ‘‘ AUTHOR πŸ‘‘

Maintained by the LLVM Team (https://llvm.org/).

2003-2023, LLVM Project


that’s the whole page, bestie β€” from LLVM-CONFIG(1), version 15, dated 2023-07-14. now go link something iconic. πŸ’…βœ¨

πŸ“¦ where this page comes from