Misha Brukman | f19aa2e | 2004-07-01 14:51:26 +0000 | [diff] [blame] | 1 | =pod |
| 2 | |
| 3 | =head1 NAME |
| 4 | |
Reid Spencer | 473cbec | 2004-12-22 06:47:25 +0000 | [diff] [blame] | 5 | llvm-gcc - LLVM C front-end |
Misha Brukman | f19aa2e | 2004-07-01 14:51:26 +0000 | [diff] [blame] | 6 | |
| 7 | =head1 SYNOPSIS |
| 8 | |
Reid Spencer | 473cbec | 2004-12-22 06:47:25 +0000 | [diff] [blame] | 9 | B<llvm-gcc> [I<options>] I<filename> |
Misha Brukman | f19aa2e | 2004-07-01 14:51:26 +0000 | [diff] [blame] | 10 | |
| 11 | =head1 DESCRIPTION |
| 12 | |
Reid Spencer | 473cbec | 2004-12-22 06:47:25 +0000 | [diff] [blame] | 13 | The B<llvm-gcc> command is the LLVM C front end. It is a modified |
Reid Spencer | 022e34d | 2007-02-12 05:02:56 +0000 | [diff] [blame] | 14 | version of gcc that compiles C/ObjC programs into native objects, LLVM |
Gabor Greif | 3bd6e0d | 2007-07-09 11:24:05 +0000 | [diff] [blame] | 15 | bitcode or LLVM assembly language, depending upon the options. |
Misha Brukman | f19aa2e | 2004-07-01 14:51:26 +0000 | [diff] [blame] | 16 | |
Reid Spencer | 022e34d | 2007-02-12 05:02:56 +0000 | [diff] [blame] | 17 | By default, B<llvm-gcc> compiles to native objects just like GCC does. If the |
Dale Johannesen | 2c3d949 | 2008-06-12 17:04:09 +0000 | [diff] [blame] | 18 | B<-emit-llvm> and B<-c> options are given then it will generate LLVM bitcode files |
| 19 | instead. If B<-emit-llvm> and B<-S> are given, then it will generate LLVM |
| 20 | assembly. |
Misha Brukman | f19aa2e | 2004-07-01 14:51:26 +0000 | [diff] [blame] | 21 | |
Reid Spencer | 473cbec | 2004-12-22 06:47:25 +0000 | [diff] [blame] | 22 | Being derived from the GNU Compiler Collection, B<llvm-gcc> has many |
Misha Brukman | f19aa2e | 2004-07-01 14:51:26 +0000 | [diff] [blame] | 23 | of gcc's features and accepts most of gcc's options. It handles a |
Dale Johannesen | 2c3d949 | 2008-06-12 17:04:09 +0000 | [diff] [blame] | 24 | number of gcc's extensions to the C programming language. See the gcc |
| 25 | documentation for details. |
Misha Brukman | f19aa2e | 2004-07-01 14:51:26 +0000 | [diff] [blame] | 26 | |
| 27 | =head1 OPTIONS |
| 28 | |
| 29 | =over |
| 30 | |
| 31 | =item B<--help> |
| 32 | |
| 33 | Print a summary of command line options. |
| 34 | |
Misha Brukman | f19aa2e | 2004-07-01 14:51:26 +0000 | [diff] [blame] | 35 | =item B<-o> I<filename> |
| 36 | |
| 37 | Specify the output file to be I<filename>. |
| 38 | |
| 39 | =item B<-I> I<directory> |
| 40 | |
| 41 | Add a directory to the header file search path. This option can be |
| 42 | repeated. |
| 43 | |
| 44 | =item B<-L> I<directory> |
| 45 | |
| 46 | Add I<directory> to the library search path. This option can be |
| 47 | repeated. |
| 48 | |
| 49 | =item B<-l>I<name> |
| 50 | |
| 51 | Link in the library libI<name>.[bc | a | so]. This library should |
Gabor Greif | 3bd6e0d | 2007-07-09 11:24:05 +0000 | [diff] [blame] | 52 | be a bitcode library. |
Misha Brukman | f19aa2e | 2004-07-01 14:51:26 +0000 | [diff] [blame] | 53 | |
Reid Spencer | 022e34d | 2007-02-12 05:02:56 +0000 | [diff] [blame] | 54 | =item B<-emit-llvm> |
Chris Lattner | f494e72 | 2005-05-13 20:09:33 +0000 | [diff] [blame] | 55 | |
Dale Johannesen | 2c3d949 | 2008-06-12 17:04:09 +0000 | [diff] [blame] | 56 | Make the output be LLVM bitcode (with B<-c>) or assembly (with B<-s>) instead |
| 57 | of native object (or assembly). If B<-emit-llvm> is given without either B<-c> |
| 58 | or B<-S> it has no effect. |
Misha Brukman | f19aa2e | 2004-07-01 14:51:26 +0000 | [diff] [blame] | 59 | |
| 60 | =back |
| 61 | |
| 62 | =head1 EXIT STATUS |
| 63 | |
Reid Spencer | 473cbec | 2004-12-22 06:47:25 +0000 | [diff] [blame] | 64 | If B<llvm-gcc> succeeds, it will exit with 0. Otherwise, if an error |
Misha Brukman | f19aa2e | 2004-07-01 14:51:26 +0000 | [diff] [blame] | 65 | occurs, it will exit with a non-zero value. |
| 66 | |
| 67 | =head1 SEE ALSO |
| 68 | |
Reid Spencer | caaef9c | 2007-02-09 16:56:25 +0000 | [diff] [blame] | 69 | L<llvm-g++|llvmgxx> |
Misha Brukman | f19aa2e | 2004-07-01 14:51:26 +0000 | [diff] [blame] | 70 | |
| 71 | =head1 AUTHORS |
| 72 | |
Reid Spencer | cd143fc | 2006-03-14 05:42:07 +0000 | [diff] [blame] | 73 | Maintained by the LLVM Team (L<http://llvm.org>). |
Misha Brukman | f19aa2e | 2004-07-01 14:51:26 +0000 | [diff] [blame] | 74 | |
| 75 | =cut |
| 76 | |