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