LLVM-CONFIG(1)

πŸ“¦
version 11.1.0 Β· 2 versions
, in fedora 43, fedora 44

πŸ’– NAME πŸ’–

llvm-config β€” bestie, it prints your LLVM compilation options. That's it. That's the whole job. And it slays at it.


✨ SYNOPSIS ✨

llvm-config option [components...]

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so real talk: llvm-config is the friend who makes building apps that use LLVM actually possible. Like, you could hand-hunt all the flags yourself, but why would you πŸ’€. It prints the compiler flags, the linker flags, and the object libraries you need to link against LLVM. That's the whole vibe. It's giving "personal assistant but for your build system."


🌸 EXAMPLES 🌸

Say you wanna link against the JIT (iconic behaviour, honestly):

g++ `llvm-config --cxxflags` -o HowToUseJIT.o -c HowToUseJIT.cpp
g++ `llvm-config --ldflags` -o HowToUseJIT HowToUseJIT.o \
    `llvm-config --libs engine bcreader scalaropts`

See how it's just vibing inside backticks? That's the move. No cap.


πŸ’… OPTIONS πŸ’…

  • --version β€” prints the version number of LLVM. The receipts. πŸ“œ
  • -help β€” prints a lil summary of all the llvm-config arguments, for when you forgot what you were doing (relatable).
  • --prefix β€” prints the installation prefix for LLVM. Where it lives. Its address. 🏠
  • --src-root β€” prints the source root that LLVM was built from.
  • --obj-root β€” prints the object root used to build LLVM.
  • --bindir β€” prints the installation directory for LLVM binaries.
  • --includedir β€” prints the installation directory for LLVM headers.
  • --libdir β€” prints the installation directory for LLVM libraries.
  • --cxxflags β€” prints the C++ compiler flags you need to use LLVM headers. Feed this straight to your compiler, bestie.
  • --ldflags β€” prints the flags needed to link against LLVM libraries.
  • --libs β€” prints all the libraries needed to link against the LLVM components you specified, dependencies included. The whole friend group, not just the main characters. πŸ‘‘
  • --libnames β€” basically --libs but it prints the bare filenames of the libraries, no -l, no pathnames. Super useful when you're linking against a not-yet-installed copy of LLVM. 🐣
  • --libfiles β€” again like --libs, but it prints the full path to each library file. Genuinely clutch when you're writing makefile dependencies, because it makes sure a tool gets relinked if any library it uses changes. Dependency brain. 🧠
  • --components β€” prints every valid component name. The guest list. πŸ“
  • --targets-built β€” prints the component names for all targets supported by this copy of LLVM.
  • --build-mode β€” prints the build mode used when LLVM was built (like Debug or Release). It tells you what energy LLVM was built with. πŸ”₯

πŸŽ€ COMPONENTS πŸŽ€

Wanna see every available component? Run:

llvm-config --components

In most cases, components correspond directly to LLVM libraries β€” one-to-one, no drama. But there are some "virtual" components that are lowkey iconic:

  • all β€” includes all LLVM libraries. This is the default if you don't specify any components, so if you're lazy (valid), you already get this. πŸ’–
  • 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. Slay. If an error happens, it exits with a non-zero value. Not slay, but at least it's honest. 😭


🌈 AUTHOR 🌈

Maintained by the LLVM Team (https://llvm.org/). The collective. The group chat. The ones holding it down. ✨


2003-2024, LLVM Project


And that's the whole page, bestie β€” this was LLVM manual page for llvm-config, dated 2024-07-18, stamped with version 11, and yes I'm signing off because you read the entire thing and that's main character energy fr fr πŸ¦‹βœ¨πŸ’–

πŸ“¦ where this page comes from