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 |
Gabor Greif | 3bd6e0d | 2007-07-09 11:24:05 +0000 | [diff] [blame] | 18 | B<-emit-llvm> option is given then it will generate LLVM bitcode files instead. |
Reid Spencer | 022e34d | 2007-02-12 05:02:56 +0000 | [diff] [blame] | 19 | If B<-S> (assembly) is also given, then it will generate LLVM assembly. |
Misha Brukman | f19aa2e | 2004-07-01 14:51:26 +0000 | [diff] [blame] | 20 | |
Reid Spencer | 473cbec | 2004-12-22 06:47:25 +0000 | [diff] [blame] | 21 | Being derived from the GNU Compiler Collection, B<llvm-gcc> has many |
Misha Brukman | f19aa2e | 2004-07-01 14:51:26 +0000 | [diff] [blame] | 22 | of gcc's features and accepts most of gcc's options. It handles a |
| 23 | number of gcc's extensions to the C programming language. |
| 24 | |
| 25 | =head1 OPTIONS |
| 26 | |
| 27 | =over |
| 28 | |
| 29 | =item B<--help> |
| 30 | |
| 31 | Print a summary of command line options. |
| 32 | |
| 33 | =item B<-S> |
| 34 | |
Gabor Greif | 3bd6e0d | 2007-07-09 11:24:05 +0000 | [diff] [blame] | 35 | Do not generate an LLVM bitcode file. Rather, compile the source |
Misha Brukman | f19aa2e | 2004-07-01 14:51:26 +0000 | [diff] [blame] | 36 | file into an LLVM assembly language file. |
| 37 | |
| 38 | =item B<-c> |
| 39 | |
| 40 | Do not generate a linked executable. Rather, compile the source |
Gabor Greif | 3bd6e0d | 2007-07-09 11:24:05 +0000 | [diff] [blame] | 41 | file into an LLVM bitcode file. This bitcode file can then be |
| 42 | linked with other bitcode files later on to generate a full LLVM |
Misha Brukman | f19aa2e | 2004-07-01 14:51:26 +0000 | [diff] [blame] | 43 | executable. |
| 44 | |
| 45 | =item B<-o> I<filename> |
| 46 | |
| 47 | Specify the output file to be I<filename>. |
| 48 | |
| 49 | =item B<-I> I<directory> |
| 50 | |
| 51 | Add a directory to the header file search path. This option can be |
| 52 | repeated. |
| 53 | |
| 54 | =item B<-L> I<directory> |
| 55 | |
| 56 | Add I<directory> to the library search path. This option can be |
| 57 | repeated. |
| 58 | |
| 59 | =item B<-l>I<name> |
| 60 | |
| 61 | Link in the library libI<name>.[bc | a | so]. This library should |
Gabor Greif | 3bd6e0d | 2007-07-09 11:24:05 +0000 | [diff] [blame] | 62 | be a bitcode library. |
Misha Brukman | f19aa2e | 2004-07-01 14:51:26 +0000 | [diff] [blame] | 63 | |
Reid Spencer | 022e34d | 2007-02-12 05:02:56 +0000 | [diff] [blame] | 64 | =item B<-emit-llvm> |
Chris Lattner | f494e72 | 2005-05-13 20:09:33 +0000 | [diff] [blame] | 65 | |
Gabor Greif | 3bd6e0d | 2007-07-09 11:24:05 +0000 | [diff] [blame] | 66 | Make the output be LLVM bitcode (or assembly) instead of native object (or |
Reid Spencer | 022e34d | 2007-02-12 05:02:56 +0000 | [diff] [blame] | 67 | assembly). |
Misha Brukman | f19aa2e | 2004-07-01 14:51:26 +0000 | [diff] [blame] | 68 | |
| 69 | =back |
| 70 | |
| 71 | =head1 EXIT STATUS |
| 72 | |
Reid Spencer | 473cbec | 2004-12-22 06:47:25 +0000 | [diff] [blame] | 73 | 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] | 74 | occurs, it will exit with a non-zero value. |
| 75 | |
| 76 | =head1 SEE ALSO |
| 77 | |
Reid Spencer | caaef9c | 2007-02-09 16:56:25 +0000 | [diff] [blame] | 78 | L<llvm-g++|llvmgxx> |
Misha Brukman | f19aa2e | 2004-07-01 14:51:26 +0000 | [diff] [blame] | 79 | |
| 80 | =head1 AUTHORS |
| 81 | |
Reid Spencer | cd143fc | 2006-03-14 05:42:07 +0000 | [diff] [blame] | 82 | Maintained by the LLVM Team (L<http://llvm.org>). |
Misha Brukman | f19aa2e | 2004-07-01 14:51:26 +0000 | [diff] [blame] | 83 | |
| 84 | =cut |
| 85 | |