blob: e4f22288414b779a2a0e7bb4b4e3dfe12a3e44b6 [file] [log] [blame]
Daniel Dunbar3b709d52012-05-08 16:50:35 +00001llvm-link - LLVM linker
2=======================
3
Daniel Dunbar3b709d52012-05-08 16:50:35 +00004SYNOPSIS
5--------
6
Dmitri Gribenkof2c87b12012-11-29 19:14:35 +00007:program:`llvm-link` [*options*] *filename ...*
Daniel Dunbar3b709d52012-05-08 16:50:35 +00008
9DESCRIPTION
10-----------
11
Dmitri Gribenkof2c87b12012-11-29 19:14:35 +000012:program:`llvm-link` takes several LLVM bitcode files and links them together
13into a single LLVM bitcode file. It writes the output file to standard output,
14unless the :option:`-o` option is used to specify a filename.
Daniel Dunbar3b709d52012-05-08 16:50:35 +000015
Dmitri Gribenkof2c87b12012-11-29 19:14:35 +000016:program:`llvm-link` attempts to load the input files from the current
17directory. If that fails, it looks for each file in each of the directories
18specified by the :option:`-L` options on the command line. The library search
19paths are global; each one is searched for every input file if necessary. The
20directories are searched in the order they were specified on the command line.
Daniel Dunbar3b709d52012-05-08 16:50:35 +000021
22OPTIONS
23-------
24
Dmitri Gribenkof2c87b12012-11-29 19:14:35 +000025.. option:: -L directory
Daniel Dunbar3b709d52012-05-08 16:50:35 +000026
Dmitri Gribenkof2c87b12012-11-29 19:14:35 +000027 Add the specified ``directory`` to the library search path. When looking for
28 libraries, :program:`llvm-link` will look in path name for libraries. This
29 option can be specified multiple times; :program:`llvm-link` will search
30 inside these directories in the order in which they were specified on the
31 command line.
Daniel Dunbar3b709d52012-05-08 16:50:35 +000032
Dmitri Gribenkof2c87b12012-11-29 19:14:35 +000033.. option:: -f
Daniel Dunbar3b709d52012-05-08 16:50:35 +000034
Dmitri Gribenkof2c87b12012-11-29 19:14:35 +000035 Enable binary output on terminals. Normally, :program:`llvm-link` will refuse
36 to write raw bitcode output if the output stream is a terminal. With this
37 option, :program:`llvm-link` will write raw bitcode regardless of the output
38 device.
Daniel Dunbar3b709d52012-05-08 16:50:35 +000039
Dmitri Gribenkof2c87b12012-11-29 19:14:35 +000040.. option:: -o filename
Daniel Dunbar3b709d52012-05-08 16:50:35 +000041
Dmitri Gribenkof2c87b12012-11-29 19:14:35 +000042 Specify the output file name. If ``filename`` is "``-``", then
43 :program:`llvm-link` will write its output to standard output.
Daniel Dunbar3b709d52012-05-08 16:50:35 +000044
Dmitri Gribenkof2c87b12012-11-29 19:14:35 +000045.. option:: -S
Daniel Dunbar3b709d52012-05-08 16:50:35 +000046
47 Write output in LLVM intermediate language (instead of bitcode).
48
Dmitri Gribenkof2c87b12012-11-29 19:14:35 +000049.. option:: -d
Daniel Dunbar3b709d52012-05-08 16:50:35 +000050
Dmitri Gribenkof2c87b12012-11-29 19:14:35 +000051 If specified, :program:`llvm-link` prints a human-readable version of the output
Daniel Dunbar3b709d52012-05-08 16:50:35 +000052 bitcode file to standard error.
53
Dmitri Gribenkof2c87b12012-11-29 19:14:35 +000054.. option:: -help
Daniel Dunbar3b709d52012-05-08 16:50:35 +000055
56 Print a summary of command line options.
57
Dmitri Gribenkof2c87b12012-11-29 19:14:35 +000058.. option:: -v
Daniel Dunbar3b709d52012-05-08 16:50:35 +000059
Dmitri Gribenkof2c87b12012-11-29 19:14:35 +000060 Verbose mode. Print information about what :program:`llvm-link` is doing.
61 This typically includes a message for each bitcode file linked in and for each
Daniel Dunbar3b709d52012-05-08 16:50:35 +000062 library found.
63
Daniel Dunbar3b709d52012-05-08 16:50:35 +000064EXIT STATUS
65-----------
66
Dmitri Gribenkof2c87b12012-11-29 19:14:35 +000067If :program:`llvm-link` succeeds, it will exit with 0. Otherwise, if an error
Daniel Dunbar3b709d52012-05-08 16:50:35 +000068occurs, it will exit with a non-zero value.
69
Daniel Dunbar3b709d52012-05-08 16:50:35 +000070SEE ALSO
71--------
72
Dmitri Gribenkof2c87b12012-11-29 19:14:35 +000073gccld
Daniel Dunbar3b709d52012-05-08 16:50:35 +000074