LLVM-LINK(1)

okay so real talk: llvm-link is the LLVM bitcode linker, and it's lowkey the glue of the whole operation. It's literally part of the LLVM fam (you'll see the LLVM manual name on the tin), and I'm about to explain it so well you'll be the main character of your compiler course. πŸŽ€

✨ SYNOPSIS ✨

llvm-link [options] filename ...

🌸 DESCRIPTION 🌸

So here's the vibe: llvm-link takes several LLVM bitcode files and links them together into a single LLVM bitcode file. That's it, that's the whole serve. ✨

The output goes to standard output by default β€” unless you use the -o option to specify a filename, which you probably should, because otherwise your terminal is gonna get a whole lot of raw bytes dumped on it. 😭

πŸ’– OPTIONS πŸ’–

  • -f β€” enables binary output on terminals. Normally llvm-link will flat-out refuse to write raw bitcode output if the output stream is a terminal (respectful king tbh). With this option, llvm-link will write raw bitcode regardless of the output device. So like, it stops asking and just does it. 🫢
  • -o filename β€” specify the output file name. And if filename is -, then llvm-link will write its output to standard output. (yes bestie, - means stdout, classic icon behavior)
  • -S β€” write output in LLVM intermediate language instead of bitcode. Human-readable era! πŸ’…
  • -d β€” if specified, llvm-link prints a human-readable version of the output bitcode file to standard error. note: standard error, not stdout β€” so you can peek without ruining your output. πŸ¦‹
  • --help β€” print a summary of command line options. the "wait what were the flags again" button, we've all been there. πŸ™ˆ
  • -v β€” verbose mode. prints info about what llvm-link is doing. This typically includes a message for each bitcode file linked in and for each library found. it's giving "narrator voice" and honestly? obsessed. πŸ”₯
  • --override filename β€” adds the passed-in file to the link and overrides symbols that have already been declared with the definitions in the file that is passed in. This flag can be specified multiple times to have multiple files act as overrides. And if a symbol is declared more than twice, the definition from the file declared last takes precedence. (last one wins, no cap β€” so order matters, bestie, do not forget) ⭐
  • --import function:filename β€” specify a function that should be imported from the specified file for linking with ThinLTO. This option can be specified multiple times to import multiple functions. 🧚
  • --summary-index filename β€” specify the path to a file containing the module summary index with the results of an earlier ThinLTO link. ⚠️ This option is required when --import is used. like, not a suggestion. required required.
  • --internalize β€” maintains existing linkage for symbols defined in the first input and converts linkage in all other inputs to internal linkage unless they are referenced by llvm*.used or are special-cased runtime functions (e.g. stack protector runtime). first file stays famous, everyone else goes private. πŸ‘‘
  • --disable-debug-info-type-map β€” disables the use of a uniquing type map for debug info. πŸ’€
  • --only-needed β€” link only needed symbols. minimalist queen behavior.
  • --disable-lazy-loading β€” disable lazy module loading. no more "i'll get to it later".
  • --suppress-warnings β€” suppress all linker warnings. living in denial (affectionate). πŸ™ˆ
  • --preserve-bc-uselistorder β€” preserve the use-list order when writing LLVM bitcode. πŸ“
  • --preserve-ll-uselistorder β€” preserve the use-list order when writing LLVM assembly. (yes, ll for assembly, bc for bitcode β€” that's the iykyk) πŸ’œ
  • --ignore-non-bitcode β€” do not error out when a non-bitcode file is encountered while processing an archive. it sees a fake and simply chooses peace. 🌈

πŸ¦‹ EXIT STATUS πŸ¦‹

If llvm-link succeeds, it will exit with 0. Otherwise, if an error occurs, it will exit with a non-zero value. simple as that, bestie. πŸ’…

🌟 Author 🌟

Maintained by the LLVM Team (https://llvm.org/). shoutout the maintainers, they're carrying. 🫢

2003-2026, LLVM Project


k that's the whole page!! πŸ’– mwah. this cutie is from the LLVM manual set, version 23, dated 2026-10-20 β€” go forth and link responsibly, bestie. βœ¨πŸ‘‘

πŸ“¦ where this page comes from
  • arch rolling: llvm 23.1.4-1 Β· Apache-2.0 WITH LLVM-exception
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms