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