blob: 0b74e436233fc04c2deb13b571f2d2e6c3556738 [file] [log] [blame]
John Criswell700c82d2003-10-03 13:45:55 +00001<html>
2<title>
3LLVM: llvmg++ tool
4</title>
5
Chris Lattner08a04fd2003-10-07 20:12:05 +00006<body bgcolor=white>
John Criswell700c82d2003-10-03 13:45:55 +00007
8<center>
Chris Lattner537a02c2003-10-07 20:01:09 +00009<h1>LLVM: <tt>llvmg++</tt> tool</h1>
John Criswell700c82d2003-10-03 13:45:55 +000010</center>
11<HR>
12
Chris Lattner537a02c2003-10-07 20:01:09 +000013<h3>NAME</h3>
14<tt>llvmg++</tt>
John Criswell700c82d2003-10-03 13:45:55 +000015
Chris Lattner537a02c2003-10-07 20:01:09 +000016<h3>SYNOPSIS</h3>
17<tt>llvmg++ [options] filename</tt>
John Criswell700c82d2003-10-03 13:45:55 +000018
Chris Lattner537a02c2003-10-07 20:01:09 +000019<h3>DESCRIPTION</h3>
John Criswell700c82d2003-10-03 13:45:55 +000020
Chris Lattner537a02c2003-10-07 20:01:09 +000021The <tt>llvmg++</tt> command is the LLVM C++ front end. It is a modified
22version of g++ that takes C++ programs and compiles them into LLVM bytecode or
23assembly language, depending upon the options.
John Criswell700c82d2003-10-03 13:45:55 +000024<p>
25
Brian Gaeke294fab12003-10-19 18:23:05 +000026Unless 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
28and 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>
30program to perform further optimizations and link the resulting bytecode
31file(s) with support libraries to create an executable program.
John Criswell700c82d2003-10-03 13:45:55 +000032<p>
33
Chris Lattner537a02c2003-10-07 20:01:09 +000034Being 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.
36It handles a number of g++'s extensions to the C++ programming language.
John Criswell700c82d2003-10-03 13:45:55 +000037<p>
38
39Below you will find several commonly used options:
40
41<h3>
42OPTIONS
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 Lattner537a02c2003-10-07 20:01:09 +000054 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 Criswell700c82d2003-10-03 13:45:55 +000057 <p>
58
59 <li> -o <i>filename</i>
60 <br>
Chris Lattner537a02c2003-10-07 20:01:09 +000061 Specify the output file to be <i>filename</i>.
John Criswell700c82d2003-10-03 13:45:55 +000062 <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 Lattner537a02c2003-10-07 20:01:09 +000078 Link in the library lib<i>name</i>.[bc | a | so]. This library should
79 be a bytecode library.
John Criswell700c82d2003-10-03 13:45:55 +000080 <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>
90EXIT STATUS
91</h3>
92
Chris Lattner537a02c2003-10-07 20:01:09 +000093If <tt>llvmg++</tt> succeeds, it will exit with 0. Otherwise, if an error
94occurs, it will exit with a non-zero value.
John Criswell700c82d2003-10-03 13:45:55 +000095
96<h3>
97SEE ALSO
98</h3>
Chris Lattner537a02c2003-10-07 20:01:09 +000099<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 Criswell700c82d2003-10-03 13:45:55 +0000102
103<HR>
Chris Lattner08a04fd2003-10-07 20:12:05 +0000104Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
John Criswell700c82d2003-10-03 13:45:55 +0000105</body>
106</html>
107