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