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