John Criswell | 700c82d | 2003-10-03 13:45:55 +0000 | [diff] [blame] | 1 | <html> |
| 2 | <title> |
| 3 | LLVM: llvmgcc tool |
| 4 | </title> |
| 5 | |
Chris Lattner | 08a04fd | 2003-10-07 20:12:05 +0000 | [diff] [blame] | 6 | <body bgcolor=white> |
John Criswell | 700c82d | 2003-10-03 13:45:55 +0000 | [diff] [blame] | 7 | |
| 8 | <center> |
Chris Lattner | aaba10c | 2003-10-07 19:51:55 +0000 | [diff] [blame] | 9 | <h1>LLVM: <tt>llvmgcc</tt> tool</h1> |
John Criswell | 700c82d | 2003-10-03 13:45:55 +0000 | [diff] [blame] | 10 | </center> |
| 11 | <HR> |
| 12 | |
Chris Lattner | aaba10c | 2003-10-07 19:51:55 +0000 | [diff] [blame] | 13 | <h3>NAME</h3> |
| 14 | <tt>llvmgcc</tt> |
John Criswell | 700c82d | 2003-10-03 13:45:55 +0000 | [diff] [blame] | 15 | |
| 16 | <h3> |
| 17 | SYNOPSIS |
| 18 | </h3> |
| 19 | |
Chris Lattner | aaba10c | 2003-10-07 19:51:55 +0000 | [diff] [blame] | 20 | <tt>llvmgcc [options] filename</tt> |
John Criswell | 700c82d | 2003-10-03 13:45:55 +0000 | [diff] [blame] | 21 | <h3> |
| 22 | DESCRIPTION |
| 23 | </h3> |
| 24 | |
Chris Lattner | aaba10c | 2003-10-07 19:51:55 +0000 | [diff] [blame] | 25 | The <tt>llvmgcc</tt> command is the LLVM C front end. It is a modified version |
| 26 | of the <a href="http://gcc.gnu.org">GNU Compiler Collection</a> (GCC) that takes |
| 27 | C programs and compiles them into LLVM bytecode or assembly language, depending |
| 28 | upon the options. |
John Criswell | 700c82d | 2003-10-03 13:45:55 +0000 | [diff] [blame] | 29 | <p> |
| 30 | |
Chris Lattner | aaba10c | 2003-10-07 19:51:55 +0000 | [diff] [blame] | 31 | The <tt>llvmgcc</tt> program uses the <a href="gccas.html"><tt>gccas</tt></a> |
| 32 | and <a href="gccld.html"><tt>gccld</tt></a> programs to do the work of creating |
| 33 | complete programs. |
John Criswell | 700c82d | 2003-10-03 13:45:55 +0000 | [diff] [blame] | 34 | <p> |
| 35 | |
Chris Lattner | aaba10c | 2003-10-07 19:51:55 +0000 | [diff] [blame] | 36 | Being derived from GCC, llvmgcc has many of GCC's features and accepts most of |
| 37 | GCC's options. It handles a number of GCC's extensions to the C programming |
| 38 | language. |
John Criswell | 700c82d | 2003-10-03 13:45:55 +0000 | [diff] [blame] | 39 | <p> |
| 40 | |
| 41 | Below you will find several commonly used options: |
| 42 | |
| 43 | <h3> |
| 44 | OPTIONS |
| 45 | </h3> |
| 46 | |
| 47 | <ul> |
| 48 | <li> -S |
| 49 | <br> |
| 50 | Do not generate an LLVM bytecode file. Rather, compile the source file |
| 51 | into an LLVM assembly language file. |
| 52 | <p> |
| 53 | |
| 54 | <li> -c |
| 55 | <br> |
| 56 | Do not generate a linked bytecode executable. Rather, compile the source |
| 57 | file into an LLVM bytecode file. This bytecode file can then be linked |
| 58 | with other bytecode files later to generate a full LLVM executable. |
| 59 | <p> |
| 60 | |
| 61 | <li> -o <i>filename</i> |
| 62 | <br> |
Chris Lattner | aaba10c | 2003-10-07 19:51:55 +0000 | [diff] [blame] | 63 | Specify the output file to be <i>filename</i>. |
John Criswell | 700c82d | 2003-10-03 13:45:55 +0000 | [diff] [blame] | 64 | <p> |
| 65 | |
| 66 | <li> -I <i>directory</i> |
| 67 | <br> |
| 68 | Add a directory to the header file search path. This option can be |
| 69 | repeated. |
| 70 | <p> |
| 71 | |
| 72 | <li> -L <i>directory</i> |
| 73 | <br> |
| 74 | Add <i>directory</i> to the library search path. This option can be |
| 75 | repeated. |
| 76 | <p> |
| 77 | |
| 78 | <li> -l<i>name</i> |
| 79 | <br> |
Chris Lattner | aaba10c | 2003-10-07 19:51:55 +0000 | [diff] [blame] | 80 | Link in the library lib<i>name</i>.[bc | a | so]. This library should |
| 81 | be a bytecode library. |
John Criswell | 700c82d | 2003-10-03 13:45:55 +0000 | [diff] [blame] | 82 | <p> |
| 83 | |
| 84 | <li>-Wl,<i>option</i> |
| 85 | <br> |
Chris Lattner | aaba10c | 2003-10-07 19:51:55 +0000 | [diff] [blame] | 86 | Pass <i>option</i> to the linker program, <a |
| 87 | href="gccld.html"><tt>gccld</tt></a>. |
John Criswell | 700c82d | 2003-10-03 13:45:55 +0000 | [diff] [blame] | 88 | <p> |
| 89 | </ul> |
| 90 | |
| 91 | <h3> |
| 92 | EXIT STATUS |
| 93 | </h3> |
| 94 | |
Chris Lattner | aaba10c | 2003-10-07 19:51:55 +0000 | [diff] [blame] | 95 | If <tt>llvmgcc</tt> succeeds, it will exit with 0. Otherwise, if an error |
| 96 | occurs, it will exit with a non-zero value. |
John Criswell | 700c82d | 2003-10-03 13:45:55 +0000 | [diff] [blame] | 97 | |
| 98 | <h3> |
| 99 | SEE ALSO |
| 100 | </h3> |
Chris Lattner | aaba10c | 2003-10-07 19:51:55 +0000 | [diff] [blame] | 101 | <A HREF="llvmgxx.html"><tt>llvmg++</tt></A>, |
| 102 | <A HREF="gccas.html"><tt>gccas</tt></A>, |
| 103 | <A HREF="gccld.html"><tt>gccld</tt></A> |
John Criswell | 700c82d | 2003-10-03 13:45:55 +0000 | [diff] [blame] | 104 | |
| 105 | <HR> |
Chris Lattner | 08a04fd | 2003-10-07 20:12:05 +0000 | [diff] [blame] | 106 | Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>. |
John Criswell | 700c82d | 2003-10-03 13:45:55 +0000 | [diff] [blame] | 107 | </body> |
| 108 | </html> |
| 109 | |