blob: 17d85d738901235e963ccef1dc520b6b06bfd905 [file] [log] [blame]
Mikhail Glushenkova606d1f2008-11-25 21:38:38 +00001=pod
2
3=head1 NAME
4
5llvmc - The LLVM Compiler Driver (WIP)
6
7=head1 SYNOPSIS
8
9B<llvmc> [I<options>] I<filenames...>
10
11=head1 DESCRIPTION
12
13B<llvmc> is a configurable driver for invoking other LLVM (and non-LLVM) tools
14in order to compile, optimize and link software for multiple languages. For
15those familiar with FSF's B<gcc> tool, it is very similar. Please note that
16B<llvmc> is considered an experimental tool.
17
18=head1 OPTIONS
19
Mikhail Glushenkovdbb61d12008-11-26 13:40:08 +000020=head2 Built-in Options
21
22LLVMC has some built-in options that can't be overridden in the
23configuration libraries.
24
Mikhail Glushenkova606d1f2008-11-25 21:38:38 +000025=over
26
Mikhail Glushenkova606d1f2008-11-25 21:38:38 +000027=item B<-o> I<filename>
28
Mikhail Glushenkovdbb61d12008-11-26 13:40:08 +000029Output file name.
30
31=item B<-x> I<language>
32
33Specify the language of the following input files until the next B<-x>
34option.
35
36=item B<-load> I<plugin_name>
37
38Load the specified plugin DLL. Example:
39S<-load $LLVM_DIR/Release/lib/LLVMCSimple.so>.
40
41=item B<-v> or B<--verbose>
42
43Enable verbose mode, i.e. print out all executed commands.
44
Mikhail Glushenkovf8c430b2009-01-09 16:16:27 +000045=item B<--check-graph>
46
47Check the compilation for common errors like mismatched output/input
48language names, multiple default edges and cycles. Hidden option,
49useful for debugging.
50
Mikhail Glushenkovdbb61d12008-11-26 13:40:08 +000051=item B<--view-graph>
52
53Show a graphical representation of the compilation graph. Requires
54that you have I<dot> and I<gv> programs installed. Hidden option,
55useful for debugging.
56
57=item B<--write-graph>
58
59Write a I<compilation-graph.dot> file in the current directory with
60the compilation graph description in the Graphviz format. Hidden
61option, useful for debugging.
62
63=item B<--save-temps>
64
65Write temporary files to the current directory and do not delete them
66on exit. Hidden option, useful for debugging.
67
68=item B<--help>
69
70Print a summary of command-line options and exit.
71
72=item B<--help-hidden>
73
74Print a summary of command-line options and exit. Print help even for
75options intended for developers.
76
77=item B<--version>
78
79Print version information and exit.
80
81=back
82
83=head2 Control Options
84
85By default, LLVMC is built with some standard configuration libraries
86that define the following options:
87
88=over
Mikhail Glushenkova606d1f2008-11-25 21:38:38 +000089
Mikhail Glushenkov24dc52d2008-12-07 16:48:07 +000090=item B<-clang>
91
92Use Clang instead of llvm-gcc.
93
Mikhail Glushenkovdaae1242008-12-12 02:34:56 +000094=item B<-opt>
95
96Enable optimization with B<opt>.
97
Mikhail Glushenkova606d1f2008-11-25 21:38:38 +000098=item B<-I> I<directory>
99
100Add a directory to the header file search path. This option can be
101repeated.
102
103=item B<-L> I<directory>
104
105Add I<directory> to the library search path. This option can be
106repeated.
107
108=item B<-l>I<name>
109
110Link in the library libI<name>.[bc | a | so]. This library should
111be a bitcode library.
112
113=item B<-emit-llvm>
114
Mikhail Glushenkovefc5c312008-12-09 14:41:00 +0000115Make the output be LLVM bitcode (with B<-c>) or assembly (with B<-S>) instead
Mikhail Glushenkova606d1f2008-11-25 21:38:38 +0000116of native object (or assembly). If B<-emit-llvm> is given without either B<-c>
117or B<-S> it has no effect.
118
Mikhail Glushenkov24dc52d2008-12-07 16:48:07 +0000119=item B<-Wa>
120
121Pass options to assembler.
122
123=item B<-Wl>
124
125Pass options to linker.
126
Mikhail Glushenkovdaae1242008-12-12 02:34:56 +0000127=item B<-Wo>
128
129Pass options to opt.
130
Mikhail Glushenkova606d1f2008-11-25 21:38:38 +0000131=back
132
133=head1 EXIT STATUS
134
Mikhail Glushenkovdbb61d12008-11-26 13:40:08 +0000135If B<llvmc> succeeds, it will exit with code 0. Otherwise, if an
136error occurs, it will exit with a non-zero value. If one of the
137compilation tools returns a non-zero status, pending actions will be
138discarded and B<llvmc> will return the same result code as the failing
139compilation tool.
Mikhail Glushenkova606d1f2008-11-25 21:38:38 +0000140
141=head1 SEE ALSO
142
143L<llvm-gcc|llvmgcc>, L<llvm-g++|llvmgxx>, L<llvm-as|llvm-as>,
144L<llvm-dis|llvm-dis>, L<llc|llc>, L<llvm-link|llvm-link>
145
146=head1 AUTHORS
147
148Maintained by the LLVM Team (L<http://llvm.org>).
149
150=cut