Reid Spencer | 72c4125 | 2006-03-23 23:22:16 +0000 | [diff] [blame] | 1 | =pod |
| 2 | |
| 3 | =head1 NAME |
| 4 | |
| 5 | llvm-config - Print LLVM compilation options |
| 6 | |
| 7 | =head1 SYNOPSIS |
| 8 | |
| 9 | B<llvm-config> I<option> [I<components>...] |
| 10 | |
| 11 | =head1 DESCRIPTION |
| 12 | |
| 13 | B<llvm-config> makes it easier to build applications that use LLVM. It can |
| 14 | print the compiler flags, linker flags and object libraries needed to link |
| 15 | against LLVM. |
| 16 | |
| 17 | =head1 EXAMPLES |
| 18 | |
| 19 | To link against the JIT: |
| 20 | |
| 21 | g++ `llvm-config --cxxflags` -o HowToUseJIT.o -c HowToUseJIT.cpp |
| 22 | g++ `llvm-config --ldflags` -o HowToUseJIT HowToUseJIT.o \ |
| 23 | `llvm-config --libs engine bcreader scalaropts` |
| 24 | |
| 25 | =head1 OPTIONS |
| 26 | |
| 27 | =over |
| 28 | |
| 29 | =item B<--version> |
| 30 | |
| 31 | Print the version number of LLVM. |
| 32 | |
| 33 | =item B<--help> |
| 34 | |
| 35 | Print a summary of B<llvm-config> arguments. |
| 36 | |
| 37 | =item B<--prefix> |
| 38 | |
| 39 | Print the installation prefix for LLVM. |
| 40 | |
| 41 | =item B<--bindir> |
| 42 | |
| 43 | Print the installation directory for LLVM binaries. |
| 44 | |
| 45 | =item B<--includedir> |
| 46 | |
| 47 | Print the installation directory for LLVM headers. |
| 48 | |
| 49 | =item B<--libdir> |
| 50 | |
| 51 | Print the installation directory for LLVM libraries. |
| 52 | |
| 53 | =item B<--cxxflags> |
| 54 | |
| 55 | Print the C++ compiler flags needed to use LLVM headers. |
| 56 | |
| 57 | =item B<--ldflags> |
| 58 | |
| 59 | Print the flags needed to link against LLVM libraries. |
| 60 | |
| 61 | =item B<--libs> |
| 62 | |
| 63 | Print all the libraries needed to link against the specified LLVM |
| 64 | I<components>, including any dependencies. |
| 65 | |
| 66 | =item B<--libnames> |
| 67 | |
| 68 | Similar to B<--libs>, but prints the bare filenames of the libraries |
| 69 | without B<-l> or pathnames. Useful for linking against a not-yet-installed |
| 70 | copy of LLVM. |
| 71 | |
Chris Lattner | 215abc7 | 2006-06-06 22:39:59 +0000 | [diff] [blame^] | 72 | =item B<--libfiles> |
| 73 | |
| 74 | Similar to B<--libs>, but print the full path to each library file. This is |
| 75 | useful when creating makefile dependencies, to ensure that a tool is relinked if |
| 76 | any library it uses changes. |
| 77 | |
Reid Spencer | 72c4125 | 2006-03-23 23:22:16 +0000 | [diff] [blame] | 78 | =item B<--components> |
| 79 | |
| 80 | Print all valid component names. |
| 81 | |
| 82 | =item B<--targets-built> |
| 83 | |
| 84 | Print the component names for all targets supported by this copy of LLVM. |
| 85 | |
| 86 | =back |
| 87 | |
| 88 | =head1 COMPONENTS |
| 89 | |
| 90 | To print a list of all available components, run B<llvm-config |
| 91 | --components>. In most cases, components correspond directly to LLVM |
| 92 | libraries. Useful "virtual" components include: |
| 93 | |
| 94 | =over |
| 95 | |
| 96 | =item B<all> |
| 97 | |
| 98 | Includes all LLVM libaries. The default if no components are specified. |
| 99 | |
| 100 | =item B<backend> |
| 101 | |
| 102 | Includes either a native backend or the C backend. |
| 103 | |
| 104 | =item B<engine> |
| 105 | |
| 106 | Includes either a native JIT or the bytecode interpreter. |
| 107 | |
| 108 | =back |
| 109 | |
| 110 | =head1 EXIT STATUS |
| 111 | |
| 112 | If B<llvm-config> succeeds, it will exit with 0. Otherwise, if an error |
| 113 | occurs, it will exit with a non-zero value. |
| 114 | |
| 115 | =head1 AUTHORS |
| 116 | |
| 117 | Maintained by the LLVM Team (L<http://llvm.org>). |
| 118 | |
| 119 | =cut |