blob: 9892ca71861e37fd9f9bb4199041502b91050fd5 [file] [log] [blame]
Misha Brukmandfb5a7b2004-07-01 14:51:26 +00001=pod
2
3=head1 NAME
4
Reid Spencer85a38de2004-12-22 06:47:25 +00005llvm-gcc - LLVM C front-end
Misha Brukmandfb5a7b2004-07-01 14:51:26 +00006
7=head1 SYNOPSIS
8
Reid Spencer85a38de2004-12-22 06:47:25 +00009B<llvm-gcc> [I<options>] I<filename>
Misha Brukmandfb5a7b2004-07-01 14:51:26 +000010
11=head1 DESCRIPTION
12
Reid Spencer85a38de2004-12-22 06:47:25 +000013The B<llvm-gcc> command is the LLVM C front end. It is a modified
Reid Spencer7e08d132007-02-12 05:02:56 +000014version of gcc that compiles C/ObjC programs into native objects, LLVM
Gabor Greif6c0bda82007-07-09 11:24:05 +000015bitcode or LLVM assembly language, depending upon the options.
Misha Brukmandfb5a7b2004-07-01 14:51:26 +000016
Reid Spencer7e08d132007-02-12 05:02:56 +000017By default, B<llvm-gcc> compiles to native objects just like GCC does. If the
Dale Johannesenb50a8452008-06-12 17:04:09 +000018B<-emit-llvm> and B<-c> options are given then it will generate LLVM bitcode files
19instead. If B<-emit-llvm> and B<-S> are given, then it will generate LLVM
20assembly.
Misha Brukmandfb5a7b2004-07-01 14:51:26 +000021
Reid Spencer85a38de2004-12-22 06:47:25 +000022Being derived from the GNU Compiler Collection, B<llvm-gcc> has many
Misha Brukmandfb5a7b2004-07-01 14:51:26 +000023of gcc's features and accepts most of gcc's options. It handles a
Dale Johannesenb50a8452008-06-12 17:04:09 +000024number of gcc's extensions to the C programming language. See the gcc
25documentation for details.
Misha Brukmandfb5a7b2004-07-01 14:51:26 +000026
27=head1 OPTIONS
28
29=over
30
31=item B<--help>
32
33Print a summary of command line options.
34
Misha Brukmandfb5a7b2004-07-01 14:51:26 +000035=item B<-o> I<filename>
36
37Specify the output file to be I<filename>.
38
39=item B<-I> I<directory>
40
41Add a directory to the header file search path. This option can be
42repeated.
43
44=item B<-L> I<directory>
45
46Add I<directory> to the library search path. This option can be
47repeated.
48
49=item B<-l>I<name>
50
51Link in the library libI<name>.[bc | a | so]. This library should
Gabor Greif6c0bda82007-07-09 11:24:05 +000052be a bitcode library.
Misha Brukmandfb5a7b2004-07-01 14:51:26 +000053
Reid Spencer7e08d132007-02-12 05:02:56 +000054=item B<-emit-llvm>
Chris Lattnerd941d9c2005-05-13 20:09:33 +000055
Dale Johannesenb50a8452008-06-12 17:04:09 +000056Make the output be LLVM bitcode (with B<-c>) or assembly (with B<-s>) instead
57of native object (or assembly). If B<-emit-llvm> is given without either B<-c>
58or B<-S> it has no effect.
Misha Brukmandfb5a7b2004-07-01 14:51:26 +000059
60=back
61
62=head1 EXIT STATUS
63
Reid Spencer85a38de2004-12-22 06:47:25 +000064If B<llvm-gcc> succeeds, it will exit with 0. Otherwise, if an error
Misha Brukmandfb5a7b2004-07-01 14:51:26 +000065occurs, it will exit with a non-zero value.
66
67=head1 SEE ALSO
68
Reid Spencer6bc85762007-02-09 16:56:25 +000069L<llvm-g++|llvmgxx>
Misha Brukmandfb5a7b2004-07-01 14:51:26 +000070
71=head1 AUTHORS
72
Reid Spencer85d182f2006-03-14 05:42:07 +000073Maintained by the LLVM Team (L<http://llvm.org>).
Misha Brukmandfb5a7b2004-07-01 14:51:26 +000074
75=cut
76