1 llvm-config - Print LLVM compilation options
2 ============================================
4 .. program:: llvm-config
9 **llvm-config** *option* [*components*...]
14 **llvm-config** makes it easier to build applications that use LLVM. It can
15 print the compiler flags, linker flags and object libraries needed to link
21 To link against the JIT:
25 g++ `llvm-config --cxxflags` -o HowToUseJIT.o -c HowToUseJIT.cpp
26 g++ `llvm-config --ldflags` -o HowToUseJIT HowToUseJIT.o \
27 `llvm-config --libs engine bcreader scalaropts`
34 Print the version number of LLVM.
38 Print a summary of **llvm-config** arguments.
42 Print the installation prefix for LLVM.
46 Print the source root from which LLVM was built.
50 Print the object root used to build LLVM.
54 Print the installation directory for LLVM binaries.
58 Print the installation directory for LLVM headers.
62 Print the installation directory for LLVM libraries.
66 Print the C++ compiler flags needed to use LLVM headers.
70 Print the flags needed to link against LLVM libraries.
74 Print all the libraries needed to link against the specified LLVM
75 *components*, including any dependencies.
79 Similar to **--libs**, but prints the bare filenames of the libraries
80 without **-l** or pathnames. Useful for linking against a not-yet-installed
85 Similar to **--libs**, but print the full path to each library file. This is
86 useful when creating makefile dependencies, to ensure that a tool is relinked if
87 any library it uses changes.
91 Print all valid component names.
95 Print the component names for all targets supported by this copy of LLVM.
99 Print the build mode used when LLVM was built (e.g. Debug or Release)
105 To print a list of all available components, run **llvm-config
106 --components**. In most cases, components correspond directly to LLVM
107 libraries. Useful "virtual" components include:
111 Includes all LLVM libraries. The default if no components are specified.
115 Includes either a native backend or the C backend.
119 Includes either a native JIT or the bitcode interpreter.
125 If **llvm-config** succeeds, it will exit with 0. Otherwise, if an error
126 occurs, it will exit with a non-zero value.