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