blob: 7efd46d96e96285aec057000661fc89884b66d72 [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
Chris Lattner537a02c2003-10-07 20:01:09 +000026The <tt>llvmg++</tt> program uses the <tt>gccas</tt> and <tt>gccld</tt> to
27assist with the creation of complete programs.
John Criswell700c82d2003-10-03 13:45:55 +000028<p>
29
Chris Lattner537a02c2003-10-07 20:01:09 +000030Being derived from the <a href="http://gcc.gnu.org">GNU Compiler Collection</a>,
31<tt>llvmg++</tt> has many of g++'s features and accepts most of g++'s options.
32It handles a number of g++'s extensions to the C++ programming language.
John Criswell700c82d2003-10-03 13:45:55 +000033<p>
34
35Below you will find several commonly used options:
36
37<h3>
38OPTIONS
39</h3>
40
41<ul>
42 <li> -S
43 <br>
44 Do not generate an LLVM bytecode file. Rather, compile the source file
45 into an LLVM assembly language file.
46 <p>
47
48 <li> -c
49 <br>
Chris Lattner537a02c2003-10-07 20:01:09 +000050 Do not generate a linked executable. Rather, compile the source file
51 into an LLVM bytecode file. This bytecode file can then be linked with
52 other bytecode files later on to generate a full LLVM executable.
John Criswell700c82d2003-10-03 13:45:55 +000053 <p>
54
55 <li> -o <i>filename</i>
56 <br>
Chris Lattner537a02c2003-10-07 20:01:09 +000057 Specify the output file to be <i>filename</i>.
John Criswell700c82d2003-10-03 13:45:55 +000058 <p>
59
60 <li> -I <i>directory</i>
61 <br>
62 Add a directory to the header file search path. This option can be
63 repeated.
64 <p>
65
66 <li> -L <i>directory</i>
67 <br>
68 Add <i>directory</i> to the library search path. This option can be
69 repeated.
70 <p>
71
72 <li> -l<i>name</i>
73 <br>
Chris Lattner537a02c2003-10-07 20:01:09 +000074 Link in the library lib<i>name</i>.[bc | a | so]. This library should
75 be a bytecode library.
John Criswell700c82d2003-10-03 13:45:55 +000076 <p>
77
78 <li>-Wl,<i>option</i>
79 <br>
80 Pass <i>option</i> to the linker (usually gccld).
81 <p>
82
83</ul>
84
85<h3>
86EXIT STATUS
87</h3>
88
Chris Lattner537a02c2003-10-07 20:01:09 +000089If <tt>llvmg++</tt> succeeds, it will exit with 0. Otherwise, if an error
90occurs, it will exit with a non-zero value.
John Criswell700c82d2003-10-03 13:45:55 +000091
92<h3>
93SEE ALSO
94</h3>
Chris Lattner537a02c2003-10-07 20:01:09 +000095<A HREF="llvmgcc.html"><tt>llvmg++</tt></A>,
96<A HREF="gccas.html"><tt>gccas</tt></A>,
97<A HREF="gccld.html"><tt>gccld</tt></A>
John Criswell700c82d2003-10-03 13:45:55 +000098
99<HR>
Chris Lattner08a04fd2003-10-07 20:12:05 +0000100Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
John Criswell700c82d2003-10-03 13:45:55 +0000101</body>
102</html>
103