1llvm-config - Print LLVM compilation options 2============================================ 3 4.. program:: llvm-config 5 6SYNOPSIS 7-------- 8 9**llvm-config** *option* [*components*...] 10 11DESCRIPTION 12----------- 13 14**llvm-config** makes it easier to build applications that use LLVM. It can 15print the compiler flags, linker flags and object libraries needed to link 16against LLVM. 17 18EXAMPLES 19-------- 20 21To link against the JIT: 22 23.. code-block:: sh 24 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` 28 29OPTIONS 30------- 31 32**--version** 33 34 Print the version number of LLVM. 35 36**-help** 37 38 Print a summary of **llvm-config** arguments. 39 40**--prefix** 41 42 Print the installation prefix for LLVM. 43 44**--src-root** 45 46 Print the source root from which LLVM was built. 47 48**--obj-root** 49 50 Print the object root used to build LLVM. 51 52**--bindir** 53 54 Print the installation directory for LLVM binaries. 55 56**--includedir** 57 58 Print the installation directory for LLVM headers. 59 60**--libdir** 61 62 Print the installation directory for LLVM libraries. 63 64**--cxxflags** 65 66 Print the C++ compiler flags needed to use LLVM headers. 67 68**--ldflags** 69 70 Print the flags needed to link against LLVM libraries. 71 72**--libs** 73 74 Print all the libraries needed to link against the specified LLVM 75 *components*, including any dependencies. 76 77**--libnames** 78 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 81 copy of LLVM. 82 83**--libfiles** 84 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. 88 89**--components** 90 91 Print all valid component names. 92 93**--targets-built** 94 95 Print the component names for all targets supported by this copy of LLVM. 96 97**--build-mode** 98 99 Print the build mode used when LLVM was built (e.g. Debug or Release) 100 101 102COMPONENTS 103---------- 104 105To print a list of all available components, run **llvm-config 106--components**. In most cases, components correspond directly to LLVM 107libraries. Useful "virtual" components include: 108 109**all** 110 111 Includes all LLVM libraries. The default if no components are specified. 112 113**backend** 114 115 Includes either a native backend or the C backend. 116 117**engine** 118 119 Includes either a native JIT or the bitcode interpreter. 120 121 122EXIT STATUS 123----------- 124 125If **llvm-config** succeeds, it will exit with 0. Otherwise, if an error 126occurs, it will exit with a non-zero value. 127