blob: 6dc8c04d483c184c969d5e0bc69da6d676e0b91d [file] [log] [blame]
Misha Brukmanf19aa2e2004-07-01 14:51:26 +00001=pod
2
3=head1 NAME
4
Reid Spencer473cbec2004-12-22 06:47:25 +00005llvm-gcc - LLVM C front-end
Misha Brukmanf19aa2e2004-07-01 14:51:26 +00006
7=head1 SYNOPSIS
8
Reid Spencer473cbec2004-12-22 06:47:25 +00009B<llvm-gcc> [I<options>] I<filename>
Misha Brukmanf19aa2e2004-07-01 14:51:26 +000010
11=head1 DESCRIPTION
12
Reid Spencer473cbec2004-12-22 06:47:25 +000013The B<llvm-gcc> command is the LLVM C front end. It is a modified
Misha Brukmanf19aa2e2004-07-01 14:51:26 +000014version of gcc that takes C programs and compiles them into LLVM
15bytecode or assembly language, depending upon the options.
16
Reid Spencer473cbec2004-12-22 06:47:25 +000017Unless the B<-S> option is specified, B<llvm-gcc> will use the
Misha Brukmanf19aa2e2004-07-01 14:51:26 +000018L<gccas|gccas> program to perform some optimizations and create an
Reid Spencer473cbec2004-12-22 06:47:25 +000019LLVM bytecode file. Unless the B<-c> option is specified, B<llvm-gcc>
Misha Brukmanf19aa2e2004-07-01 14:51:26 +000020will also use the L<gccld|gccld> program to perform further
21optimizations and link the resulting bytecode file(s) with support
22libraries to create an executable program.
23
Reid Spencer473cbec2004-12-22 06:47:25 +000024Being derived from the GNU Compiler Collection, B<llvm-gcc> has many
Misha Brukmanf19aa2e2004-07-01 14:51:26 +000025of gcc's features and accepts most of gcc's options. It handles a
26number of gcc's extensions to the C programming language.
27
28=head1 OPTIONS
29
30=over
31
32=item B<--help>
33
34Print a summary of command line options.
35
36=item B<-S>
37
38Do not generate an LLVM bytecode file. Rather, compile the source
39file into an LLVM assembly language file.
40
41=item B<-c>
42
43Do not generate a linked executable. Rather, compile the source
44file into an LLVM bytecode file. This bytecode file can then be
45linked with other bytecode files later on to generate a full LLVM
46executable.
47
48=item B<-o> I<filename>
49
50Specify the output file to be I<filename>.
51
52=item B<-I> I<directory>
53
54Add a directory to the header file search path. This option can be
55repeated.
56
57=item B<-L> I<directory>
58
59Add I<directory> to the library search path. This option can be
60repeated.
61
62=item B<-l>I<name>
63
64Link in the library libI<name>.[bc | a | so]. This library should
65be a bytecode library.
66
67=item B<-Wl,>I<option>
68
69Pass I<option> to the linker (usually gccld).
70
71=back
72
73=head1 EXIT STATUS
74
Reid Spencer473cbec2004-12-22 06:47:25 +000075If B<llvm-gcc> succeeds, it will exit with 0. Otherwise, if an error
Misha Brukmanf19aa2e2004-07-01 14:51:26 +000076occurs, it will exit with a non-zero value.
77
78=head1 SEE ALSO
79
Reid Spencer473cbec2004-12-22 06:47:25 +000080L<llvm-g++|llvmgxx>, L<gccas|gccas>, L<gccld|gccld>
Misha Brukmanf19aa2e2004-07-01 14:51:26 +000081
82=head1 AUTHORS
83
84Maintained by the LLVM Team (L<http://llvm.cs.uiuc.edu>).
85
86=cut
87