99657d22f82a4556a99902653f52151ab71a4efc
[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 The <tt>llvmgcc</tt> program uses the <a href="gccas.html"><tt>gccas</tt></a>
32 and <a href="gccld.html"><tt>gccld</tt></a> programs to do the work of creating
33 complete programs.
34 <p>
35
36 Being derived from GCC, llvmgcc has many of GCC's features and accepts most of
37 GCC's options.  It handles a number of GCC's extensions to the C programming
38 language.
39 <p>
40
41 Below you will find several commonly used options:
42
43 <h3>
44 OPTIONS
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>
63         Specify the output file to be <i>filename</i>.
64         <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>
80         Link in the library lib<i>name</i>.[bc | a | so].  This library should
81         be a bytecode library.
82         <p>
83
84         <li>-Wl,<i>option</i>
85         <br>
86         Pass <i>option</i> to the linker program, <a
87         href="gccld.html"><tt>gccld</tt></a>.
88         <p>
89 </ul>
90
91 <h3>
92 EXIT STATUS
93 </h3>
94
95 If <tt>llvmgcc</tt> succeeds, it will exit with 0.  Otherwise, if an error
96 occurs, it will exit with a non-zero value.
97
98 <h3>
99 SEE ALSO
100 </h3>
101 <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>
104
105 <HR>
106 Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
107 </body>
108 </html>
109