blob: 0b2b1566824b71aad7f5ebd44d285cba8489b1d1 [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
Reid Spencer022e34d2007-02-12 05:02:56 +000014version of gcc that compiles C/ObjC programs into native objects, LLVM
Gabor Greif3bd6e0d2007-07-09 11:24:05 +000015bitcode or LLVM assembly language, depending upon the options.
Misha Brukmanf19aa2e2004-07-01 14:51:26 +000016
Reid Spencer022e34d2007-02-12 05:02:56 +000017By default, B<llvm-gcc> compiles to native objects just like GCC does. If the
Gabor Greif3bd6e0d2007-07-09 11:24:05 +000018B<-emit-llvm> option is given then it will generate LLVM bitcode files instead.
Reid Spencer022e34d2007-02-12 05:02:56 +000019If B<-S> (assembly) is also given, then it will generate LLVM assembly.
Misha Brukmanf19aa2e2004-07-01 14:51:26 +000020
Reid Spencer473cbec2004-12-22 06:47:25 +000021Being derived from the GNU Compiler Collection, B<llvm-gcc> has many
Misha Brukmanf19aa2e2004-07-01 14:51:26 +000022of gcc's features and accepts most of gcc's options. It handles a
23number of gcc's extensions to the C programming language.
24
25=head1 OPTIONS
26
27=over
28
29=item B<--help>
30
31Print a summary of command line options.
32
33=item B<-S>
34
Gabor Greif3bd6e0d2007-07-09 11:24:05 +000035Do not generate an LLVM bitcode file. Rather, compile the source
Misha Brukmanf19aa2e2004-07-01 14:51:26 +000036file into an LLVM assembly language file.
37
38=item B<-c>
39
40Do not generate a linked executable. Rather, compile the source
Gabor Greif3bd6e0d2007-07-09 11:24:05 +000041file into an LLVM bitcode file. This bitcode file can then be
42linked with other bitcode files later on to generate a full LLVM
Misha Brukmanf19aa2e2004-07-01 14:51:26 +000043executable.
44
45=item B<-o> I<filename>
46
47Specify the output file to be I<filename>.
48
49=item B<-I> I<directory>
50
51Add a directory to the header file search path. This option can be
52repeated.
53
54=item B<-L> I<directory>
55
56Add I<directory> to the library search path. This option can be
57repeated.
58
59=item B<-l>I<name>
60
61Link in the library libI<name>.[bc | a | so]. This library should
Gabor Greif3bd6e0d2007-07-09 11:24:05 +000062be a bitcode library.
Misha Brukmanf19aa2e2004-07-01 14:51:26 +000063
Reid Spencer022e34d2007-02-12 05:02:56 +000064=item B<-emit-llvm>
Chris Lattnerf494e722005-05-13 20:09:33 +000065
Gabor Greif3bd6e0d2007-07-09 11:24:05 +000066Make the output be LLVM bitcode (or assembly) instead of native object (or
Reid Spencer022e34d2007-02-12 05:02:56 +000067assembly).
Misha Brukmanf19aa2e2004-07-01 14:51:26 +000068
69=back
70
71=head1 EXIT STATUS
72
Reid Spencer473cbec2004-12-22 06:47:25 +000073If B<llvm-gcc> succeeds, it will exit with 0. Otherwise, if an error
Misha Brukmanf19aa2e2004-07-01 14:51:26 +000074occurs, it will exit with a non-zero value.
75
76=head1 SEE ALSO
77
Reid Spencercaaef9c2007-02-09 16:56:25 +000078L<llvm-g++|llvmgxx>
Misha Brukmanf19aa2e2004-07-01 14:51:26 +000079
80=head1 AUTHORS
81
Reid Spencercd143fc2006-03-14 05:42:07 +000082Maintained by the LLVM Team (L<http://llvm.org>).
Misha Brukmanf19aa2e2004-07-01 14:51:26 +000083
84=cut
85