Fix typo. Found by William Moss.
[oota-llvm.git] / docs / CommandGuide / llvmc.pod
1 =pod
2
3 =head1 NAME
4
5 llvmc - The LLVM Compiler Driver (WIP)
6
7 =head1 SYNOPSIS
8
9 B<llvmc> [I<options>] I<filenames...>
10
11 =head1 DESCRIPTION
12
13 B<llvmc> is a configurable driver for invoking other LLVM (and non-LLVM) tools
14 in order to compile, optimize and link software for multiple languages. For
15 those familiar with FSF's B<gcc> tool, it is very similar.  Please note that
16 B<llvmc> is considered an experimental tool.
17
18 =head1 OPTIONS
19
20 =head2 Built-in Options
21
22 LLVMC has some built-in options that can't be overridden in the
23 configuration libraries.
24
25 =over
26
27 =item B<-o> I<filename>
28
29 Output file name.
30
31 =item B<-x> I<language>
32
33 Specify the language of the following input files until the next B<-x>
34 option.
35
36 =item B<-load> I<plugin_name>
37
38 Load the specified plugin DLL. Example:
39 S<-load $LLVM_DIR/Release/lib/LLVMCSimple.so>.
40
41 =item B<-v> or B<--verbose>
42
43 Enable verbose mode, i.e. print out all executed commands.
44
45 =item B<--check-graph>
46
47 Check the compilation for common errors like mismatched output/input
48 language names, multiple default edges and cycles. Hidden option,
49 useful for debugging.
50
51 =item B<--view-graph>
52
53 Show a graphical representation of the compilation graph. Requires
54 that you have I<dot> and I<gv> programs installed. Hidden option,
55 useful for debugging.
56
57 =item B<--write-graph>
58
59 Write a I<compilation-graph.dot> file in the current directory with
60 the compilation graph description in the Graphviz format. Hidden
61 option, useful for debugging.
62
63 =item B<--save-temps>
64
65 Write temporary files to the current directory and do not delete them
66 on exit. Hidden option, useful for debugging.
67
68 =item B<--help>
69
70 Print a summary of command-line options and exit.
71
72 =item B<--help-hidden>
73
74 Print a summary of command-line options and exit. Print help even for
75 options intended for developers.
76
77 =item B<--version>
78
79 Print version information and exit.
80
81 =item B<@>I<file>
82
83 Read command-line options from I<file>. The options read are inserted
84 in place of the original @I<file> option. If I<file> does not exist, or
85 cannot be read, then the option will be treated literally, and not
86 removed.
87
88 Options in I<file> are separated by whitespace. A whitespace character
89 may be included in an option by surrounding the entire option in
90 either single or double quotes. Any character (including a backslash)
91 may be included by prefixing the character to be included with a
92 backslash. The file may itself contain additional @I<file> options;
93 any such options will be processed recursively.
94
95
96 =back
97
98
99 =head2 Control Options
100
101 By default, LLVMC is built with some standard configuration libraries
102 that define the following options:
103
104 =over
105
106 =item B<-clang>
107
108 Use Clang instead of llvm-gcc.
109
110 =item B<-opt>
111
112 Enable optimization with B<opt>.
113
114 =item B<-I> I<directory>
115
116 Add a directory to the header file search path.  This option can be
117 repeated.
118
119 =item B<-L> I<directory>
120
121 Add I<directory> to the library search path.  This option can be
122 repeated.
123
124 =item B<-l>I<name>
125
126 Link in the library libI<name>.[bc | a | so].  This library should
127 be a bitcode library.
128
129 =item B<-emit-llvm>
130
131 Make the output be LLVM bitcode (with B<-c>) or assembly (with B<-S>) instead
132 of native object (or assembly).  If B<-emit-llvm> is given without either B<-c>
133 or B<-S> it has no effect.
134
135 =item B<-Wa>
136
137 Pass options to assembler.
138
139 =item B<-Wl>
140
141 Pass options to linker.
142
143 =item B<-Wo>
144
145 Pass options to opt.
146
147 =back
148
149 =head1 EXIT STATUS
150
151 If B<llvmc> succeeds, it will exit with code 0.  Otherwise, if an
152 error occurs, it will exit with a non-zero value. If one of the
153 compilation tools returns a non-zero status, pending actions will be
154 discarded and B<llvmc> will return the same result code as the failing
155 compilation tool.
156
157 =head1 SEE ALSO
158
159 L<llvm-gcc|llvmgcc>, L<llvm-g++|llvmgxx>, L<llvm-as|llvm-as>,
160 L<llvm-dis|llvm-dis>, L<llc|llc>, L<llvm-link|llvm-link>
161
162 =head1 AUTHORS
163
164 Maintained by the LLVM Team (L<http://llvm.org>).
165
166 =cut