blob: 8751d1d6b9d1fe4b616ba980c325aa962297367a [file] [log] [blame]
Reid Spencer72c41252006-03-23 23:22:16 +00001=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<--bindir>
42
43Print the installation directory for LLVM binaries.
44
45=item B<--includedir>
46
47Print the installation directory for LLVM headers.
48
49=item B<--libdir>
50
51Print the installation directory for LLVM libraries.
52
53=item B<--cxxflags>
54
55Print the C++ compiler flags needed to use LLVM headers.
56
57=item B<--ldflags>
58
59Print the flags needed to link against LLVM libraries.
60
61=item B<--libs>
62
63Print all the libraries needed to link against the specified LLVM
64I<components>, including any dependencies.
65
66=item B<--libnames>
67
68Similar to B<--libs>, but prints the bare filenames of the libraries
69without B<-l> or pathnames. Useful for linking against a not-yet-installed
70copy of LLVM.
71
Chris Lattner215abc72006-06-06 22:39:59 +000072=item B<--libfiles>
73
74Similar to B<--libs>, but print the full path to each library file. This is
75useful when creating makefile dependencies, to ensure that a tool is relinked if
76any library it uses changes.
77
Reid Spencer72c41252006-03-23 23:22:16 +000078=item B<--components>
79
80Print all valid component names.
81
82=item B<--targets-built>
83
84Print the component names for all targets supported by this copy of LLVM.
85
86=back
87
88=head1 COMPONENTS
89
90To print a list of all available components, run B<llvm-config
91--components>. In most cases, components correspond directly to LLVM
92libraries. Useful "virtual" components include:
93
94=over
95
96=item B<all>
97
98Includes all LLVM libaries. The default if no components are specified.
99
100=item B<backend>
101
102Includes either a native backend or the C backend.
103
104=item B<engine>
105
106Includes either a native JIT or the bytecode interpreter.
107
108=back
109
110=head1 EXIT STATUS
111
112If B<llvm-config> succeeds, it will exit with 0. Otherwise, if an error
113occurs, it will exit with a non-zero value.
114
115=head1 AUTHORS
116
117Maintained by the LLVM Team (L<http://llvm.org>).
118
119=cut