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 (ONorOFF). β¨--bindirβ prints the installation directory for LLVM binaries.--build-modeβ prints the build mode used when LLVM was built (e.g.DebugorRelease).--build-systemβ prints the build system used to build LLVM (e.g.cmakeorgn).--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 withrtti(YESorNO).--helpβ prints a summary ofllvm-configarguments. bestie behavior.--host-targetβ prints the target triple used to configure LLVM.--ignore-libllvmβ ignorelibLLVMand 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-lor 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 (sharedorstatic).--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/).
πΈ COPYRIGHT πΈ
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
- ubuntu jammy: llvm-15 1:15.0.7-0ubuntu0.22.04.3 Β· 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