blob: 99657d22f82a4556a99902653f52151ab71a4efc [file] [log] [blame]
John Criswell700c82d2003-10-03 13:45:55 +00001<html>
2<title>
3LLVM: llvmgcc 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 Lattneraaba10c2003-10-07 19:51:55 +00009<h1>LLVM: <tt>llvmgcc</tt> tool</h1>
John Criswell700c82d2003-10-03 13:45:55 +000010</center>
11<HR>
12
Chris Lattneraaba10c2003-10-07 19:51:55 +000013<h3>NAME</h3>
14<tt>llvmgcc</tt>
John Criswell700c82d2003-10-03 13:45:55 +000015
16<h3>
17SYNOPSIS
18</h3>
19
Chris Lattneraaba10c2003-10-07 19:51:55 +000020<tt>llvmgcc [options] filename</tt>
John Criswell700c82d2003-10-03 13:45:55 +000021<h3>
22DESCRIPTION
23</h3>
24
Chris Lattneraaba10c2003-10-07 19:51:55 +000025The <tt>llvmgcc</tt> command is the LLVM C front end. It is a modified version
26of the <a href="http://gcc.gnu.org">GNU Compiler Collection</a> (GCC) that takes
27C programs and compiles them into LLVM bytecode or assembly language, depending
28upon the options.
John Criswell700c82d2003-10-03 13:45:55 +000029<p>
30
Chris Lattneraaba10c2003-10-07 19:51:55 +000031The <tt>llvmgcc</tt> program uses the <a href="gccas.html"><tt>gccas</tt></a>
32and <a href="gccld.html"><tt>gccld</tt></a> programs to do the work of creating
33complete programs.
John Criswell700c82d2003-10-03 13:45:55 +000034<p>
35
Chris Lattneraaba10c2003-10-07 19:51:55 +000036Being derived from GCC, llvmgcc has many of GCC's features and accepts most of
37GCC's options. It handles a number of GCC's extensions to the C programming
38language.
John Criswell700c82d2003-10-03 13:45:55 +000039<p>
40
41Below you will find several commonly used options:
42
43<h3>
44OPTIONS
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 Lattneraaba10c2003-10-07 19:51:55 +000063 Specify the output file to be <i>filename</i>.
John Criswell700c82d2003-10-03 13:45:55 +000064 <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 Lattneraaba10c2003-10-07 19:51:55 +000080 Link in the library lib<i>name</i>.[bc | a | so]. This library should
81 be a bytecode library.
John Criswell700c82d2003-10-03 13:45:55 +000082 <p>
83
84 <li>-Wl,<i>option</i>
85 <br>
Chris Lattneraaba10c2003-10-07 19:51:55 +000086 Pass <i>option</i> to the linker program, <a
87 href="gccld.html"><tt>gccld</tt></a>.
John Criswell700c82d2003-10-03 13:45:55 +000088 <p>
89</ul>
90
91<h3>
92EXIT STATUS
93</h3>
94
Chris Lattneraaba10c2003-10-07 19:51:55 +000095If <tt>llvmgcc</tt> succeeds, it will exit with 0. Otherwise, if an error
96occurs, it will exit with a non-zero value.
John Criswell700c82d2003-10-03 13:45:55 +000097
98<h3>
99SEE ALSO
100</h3>
Chris Lattneraaba10c2003-10-07 19:51:55 +0000101<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 Criswell700c82d2003-10-03 13:45:55 +0000104
105<HR>
Chris Lattner08a04fd2003-10-07 20:12:05 +0000106Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
John Criswell700c82d2003-10-03 13:45:55 +0000107</body>
108</html>
109