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