brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.6 KiB · 1c5c9c7 Raw
177 lines · plain
1llvm-config - Print LLVM compilation options2============================================3 4.. program:: llvm-config5 6SYNOPSIS7--------8 9**llvm-config** *option* [*components*...]10 11DESCRIPTION12-----------13 14**llvm-config** makes it easier to build applications that use LLVM.  It can15print the compiler flags, linker flags and object libraries needed to link16against LLVM.17 18EXAMPLES19--------20 21To link against the JIT:22 23.. code-block:: sh24 25   g++ `llvm-config --cxxflags` -o HowToUseJIT.o -c HowToUseJIT.cpp26   g++ `llvm-config --ldflags` -o HowToUseJIT HowToUseJIT.o \27       `llvm-config --libs engine bcreader scalaropts`28 29OPTIONS30-------31 32**--assertion-mode**33 34 Print the assertion mode used when LLVM was built (ON or OFF).35 36**--bindir**37 38 Print the installation directory for LLVM binaries.39 40**--build-mode**41 42 Print the build mode used when LLVM was built (e.g. Debug or Release).43 44**--build-system**45 46 Print the build system used to build LLVM (e.g. `cmake` or `gn`).47 48**--cflags**49 50 Print the C compiler flags needed to use LLVM headers.51 52**--cmakedir**53 54 Print the installation directory for LLVM CMake modules.55 56**--components**57 58 Print all valid component names.59 60**--cppflags**61 62 Print the C preprocessor flags needed to use LLVM headers.63 64**--cxxflags**65 66 Print the C++ compiler flags needed to use LLVM headers.67 68**--has-rtti**69 70 Print whether or not LLVM was built with rtti (YES or NO).71 72**--help**73 74 Print a summary of **llvm-config** arguments.75 76**--host-target**77 78 Print the target triple used to configure LLVM.79 80**--ignore-libllvm**81 82 Ignore libLLVM and link component libraries instead.83 84**--includedir**85 86 Print the installation directory for LLVM headers.87 88**--ldflags**89 90 Print the flags needed to link against LLVM libraries.91 92**--libdir**93 94 Print the installation directory for LLVM libraries.95 96**--libfiles**97 98 Similar to **--libs**, but print the full path to each library file.  This is99 useful when creating makefile dependencies, to ensure that a tool is relinked if100 any library it uses changes.101 102**--libnames**103 104 Similar to **--libs**, but prints the bare filenames of the libraries105 without **-l** or pathnames.  Useful for linking against a not-yet-installed106 copy of LLVM.107 108**--libs**109 110 Print all the libraries needed to link against the specified LLVM111 *components*, including any dependencies.112 113**--link-shared**114 115 Link the components as shared libraries.116 117**--link-static**118 119 Link the component libraries statically.120 121**--obj-root**122 123 Print the object root used to build LLVM.124 125**--prefix**126 127 Print the installation prefix for LLVM.128 129**--quote-paths**130 131 Quote and escape paths when needed, most notably when a quote, space, backslash132 or dollar sign characters are present in the path.133 134**--shared-mode**135 136 Print how the provided components can be collectively linked (`shared` or `static`).137 138**--system-libs**139 140 Print all the system libraries needed to link against the specified LLVM141 *components*, including any dependencies.142 143**--targets-built**144 145 Print the component names for all targets supported by this copy of LLVM.146 147**--version**148 149 Print the version number of LLVM.150 151 152COMPONENTS153----------154 155To print a list of all available components, run **llvm-config156--components**.  In most cases, components correspond directly to LLVM157libraries.  Useful "virtual" components include:158 159**all**160 161 Includes all LLVM libraries.  The default if no components are specified.162 163**backend**164 165 Includes either a native backend or the C backend.166 167**engine**168 169 Includes either a native JIT or the bitcode interpreter.170 171 172EXIT STATUS173-----------174 175If **llvm-config** succeeds, it will exit with 0.  Otherwise, if an error176occurs, it will exit with a non-zero value.177