blob: 5938e36f27d869defcfa7c91c4e9735d45f3fdac [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
45=item B<--view-graph>
46
47Show a graphical representation of the compilation graph. Requires
48that you have I<dot> and I<gv> programs installed. Hidden option,
49useful for debugging.
50
51=item B<--write-graph>
52
53Write a I<compilation-graph.dot> file in the current directory with
54the compilation graph description in the Graphviz format. Hidden
55option, useful for debugging.
56
57=item B<--save-temps>
58
59Write temporary files to the current directory and do not delete them
60on exit. Hidden option, useful for debugging.
61
62=item B<--help>
63
64Print a summary of command-line options and exit.
65
66=item B<--help-hidden>
67
68Print a summary of command-line options and exit. Print help even for
69options intended for developers.
70
71=item B<--version>
72
73Print version information and exit.
74
75=back
76
77=head2 Control Options
78
79By default, LLVMC is built with some standard configuration libraries
80that define the following options:
81
82=over
Mikhail Glushenkova606d1f2008-11-25 21:38:38 +000083
Mikhail Glushenkov24dc52d2008-12-07 16:48:07 +000084=item B<-clang>
85
86Use Clang instead of llvm-gcc.
87
Mikhail Glushenkova606d1f2008-11-25 21:38:38 +000088=item B<-I> I<directory>
89
90Add a directory to the header file search path. This option can be
91repeated.
92
93=item B<-L> I<directory>
94
95Add I<directory> to the library search path. This option can be
96repeated.
97
98=item B<-l>I<name>
99
100Link in the library libI<name>.[bc | a | so]. This library should
101be a bitcode library.
102
103=item B<-emit-llvm>
104
Mikhail Glushenkovefc5c312008-12-09 14:41:00 +0000105Make the output be LLVM bitcode (with B<-c>) or assembly (with B<-S>) instead
Mikhail Glushenkova606d1f2008-11-25 21:38:38 +0000106of native object (or assembly). If B<-emit-llvm> is given without either B<-c>
107or B<-S> it has no effect.
108
Mikhail Glushenkov24dc52d2008-12-07 16:48:07 +0000109=item B<-Wa>
110
111Pass options to assembler.
112
113=item B<-Wl>
114
115Pass options to linker.
116
Mikhail Glushenkova606d1f2008-11-25 21:38:38 +0000117=back
118
119=head1 EXIT STATUS
120
Mikhail Glushenkovdbb61d12008-11-26 13:40:08 +0000121If B<llvmc> succeeds, it will exit with code 0. Otherwise, if an
122error occurs, it will exit with a non-zero value. If one of the
123compilation tools returns a non-zero status, pending actions will be
124discarded and B<llvmc> will return the same result code as the failing
125compilation tool.
Mikhail Glushenkova606d1f2008-11-25 21:38:38 +0000126
127=head1 SEE ALSO
128
129L<llvm-gcc|llvmgcc>, L<llvm-g++|llvmgxx>, L<llvm-as|llvm-as>,
130L<llvm-dis|llvm-dis>, L<llc|llc>, L<llvm-link|llvm-link>
131
132=head1 AUTHORS
133
134Maintained by the LLVM Team (L<http://llvm.org>).
135
136=cut