Daniel Dunbar | 3b709d5 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 1 | llvm-link - LLVM linker |
| 2 | ======================= |
| 3 | |
Daniel Dunbar | 3b709d5 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 4 | SYNOPSIS |
| 5 | -------- |
| 6 | |
Dmitri Gribenko | f2c87b1 | 2012-11-29 19:14:35 +0000 | [diff] [blame] | 7 | :program:`llvm-link` [*options*] *filename ...* |
Daniel Dunbar | 3b709d5 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 8 | |
| 9 | DESCRIPTION |
| 10 | ----------- |
| 11 | |
Dmitri Gribenko | f2c87b1 | 2012-11-29 19:14:35 +0000 | [diff] [blame] | 12 | :program:`llvm-link` takes several LLVM bitcode files and links them together |
| 13 | into a single LLVM bitcode file. It writes the output file to standard output, |
| 14 | unless the :option:`-o` option is used to specify a filename. |
Daniel Dunbar | 3b709d5 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 15 | |
Dmitri Gribenko | f2c87b1 | 2012-11-29 19:14:35 +0000 | [diff] [blame] | 16 | :program:`llvm-link` attempts to load the input files from the current |
| 17 | directory. If that fails, it looks for each file in each of the directories |
| 18 | specified by the :option:`-L` options on the command line. The library search |
| 19 | paths are global; each one is searched for every input file if necessary. The |
| 20 | directories are searched in the order they were specified on the command line. |
Daniel Dunbar | 3b709d5 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 21 | |
| 22 | OPTIONS |
| 23 | ------- |
| 24 | |
Dmitri Gribenko | f2c87b1 | 2012-11-29 19:14:35 +0000 | [diff] [blame] | 25 | .. option:: -L directory |
Daniel Dunbar | 3b709d5 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 26 | |
Dmitri Gribenko | f2c87b1 | 2012-11-29 19:14:35 +0000 | [diff] [blame] | 27 | 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 Dunbar | 3b709d5 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 32 | |
Dmitri Gribenko | f2c87b1 | 2012-11-29 19:14:35 +0000 | [diff] [blame] | 33 | .. option:: -f |
Daniel Dunbar | 3b709d5 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 34 | |
Dmitri Gribenko | f2c87b1 | 2012-11-29 19:14:35 +0000 | [diff] [blame] | 35 | 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 Dunbar | 3b709d5 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 39 | |
Dmitri Gribenko | f2c87b1 | 2012-11-29 19:14:35 +0000 | [diff] [blame] | 40 | .. option:: -o filename |
Daniel Dunbar | 3b709d5 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 41 | |
Dmitri Gribenko | f2c87b1 | 2012-11-29 19:14:35 +0000 | [diff] [blame] | 42 | Specify the output file name. If ``filename`` is "``-``", then |
| 43 | :program:`llvm-link` will write its output to standard output. |
Daniel Dunbar | 3b709d5 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 44 | |
Dmitri Gribenko | f2c87b1 | 2012-11-29 19:14:35 +0000 | [diff] [blame] | 45 | .. option:: -S |
Daniel Dunbar | 3b709d5 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 46 | |
| 47 | Write output in LLVM intermediate language (instead of bitcode). |
| 48 | |
Dmitri Gribenko | f2c87b1 | 2012-11-29 19:14:35 +0000 | [diff] [blame] | 49 | .. option:: -d |
Daniel Dunbar | 3b709d5 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 50 | |
Dmitri Gribenko | f2c87b1 | 2012-11-29 19:14:35 +0000 | [diff] [blame] | 51 | If specified, :program:`llvm-link` prints a human-readable version of the output |
Daniel Dunbar | 3b709d5 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 52 | bitcode file to standard error. |
| 53 | |
Dmitri Gribenko | f2c87b1 | 2012-11-29 19:14:35 +0000 | [diff] [blame] | 54 | .. option:: -help |
Daniel Dunbar | 3b709d5 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 55 | |
| 56 | Print a summary of command line options. |
| 57 | |
Dmitri Gribenko | f2c87b1 | 2012-11-29 19:14:35 +0000 | [diff] [blame] | 58 | .. option:: -v |
Daniel Dunbar | 3b709d5 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 59 | |
Dmitri Gribenko | f2c87b1 | 2012-11-29 19:14:35 +0000 | [diff] [blame] | 60 | 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 Dunbar | 3b709d5 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 62 | library found. |
| 63 | |
Daniel Dunbar | 3b709d5 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 64 | EXIT STATUS |
| 65 | ----------- |
| 66 | |
Dmitri Gribenko | f2c87b1 | 2012-11-29 19:14:35 +0000 | [diff] [blame] | 67 | If :program:`llvm-link` succeeds, it will exit with 0. Otherwise, if an error |
Daniel Dunbar | 3b709d5 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 68 | occurs, it will exit with a non-zero value. |
| 69 | |
Daniel Dunbar | 3b709d5 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 70 | SEE ALSO |
| 71 | -------- |
| 72 | |
Dmitri Gribenko | f2c87b1 | 2012-11-29 19:14:35 +0000 | [diff] [blame] | 73 | gccld |
Daniel Dunbar | 3b709d5 | 2012-05-08 16:50:35 +0000 | [diff] [blame] | 74 | |