ReST-ify some markup in the LIT document
[oota-llvm.git] / docs / CommandGuide / llvm-link.rst
1 llvm-link - LLVM linker
2 =======================
3
4
5 SYNOPSIS
6 --------
7
8
9 **llvm-link** [*options*] *filename ...*
10
11
12 DESCRIPTION
13 -----------
14
15
16 **llvm-link** takes several LLVM bitcode files and links them together into a
17 single LLVM bitcode file.  It writes the output file to standard output, unless
18 the **-o** option is used to specify a filename.
19
20 **llvm-link** attempts to load the input files from the current directory.  If
21 that fails, it looks for each file in each of the directories specified by the
22 **-L** options on the command line.  The library search paths are global; each
23 one is searched for every input file if necessary.  The directories are searched
24 in the order they were specified on the command line.
25
26
27 OPTIONS
28 -------
29
30
31
32 **-L** *directory*
33
34  Add the specified *directory* to the library search path.  When looking for
35  libraries, **llvm-link** will look in path name for libraries.  This option can be
36  specified multiple times; **llvm-link** will search inside these directories in
37  the order in which they were specified on the command line.
38
39
40
41 **-f**
42
43  Enable binary output on terminals.  Normally, **llvm-link** will refuse to
44  write raw bitcode output if the output stream is a terminal. With this option,
45  **llvm-link** will write raw bitcode regardless of the output device.
46
47
48
49 **-o** *filename*
50
51  Specify the output file name.  If *filename* is ``-``, then **llvm-link** will
52  write its output to standard output.
53
54
55
56 **-S**
57
58  Write output in LLVM intermediate language (instead of bitcode).
59
60
61
62 **-d**
63
64  If specified, **llvm-link** prints a human-readable version of the output
65  bitcode file to standard error.
66
67
68
69 **-help**
70
71  Print a summary of command line options.
72
73
74
75 **-v**
76
77  Verbose mode.  Print information about what **llvm-link** is doing.  This
78  typically includes a message for each bitcode file linked in and for each
79  library found.
80
81
82
83
84 EXIT STATUS
85 -----------
86
87
88 If **llvm-link** succeeds, it will exit with 0.  Otherwise, if an error
89 occurs, it will exit with a non-zero value.
90
91
92 SEE ALSO
93 --------
94
95
96 gccld|gccld