LLVM-LINK(1)

okay so welcome to llvm-link from the LLVM manual collection β€” yes it's the linker one, the one that smooshes your bitcode together ✨


🌸 NAME 🌸

llvm-link β€” the LLVM bitcode linker. that's it, that's the vibe 🫢


✨ SYNOPSIS ✨

llvm-link [options] filename ...

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜• β€” llvm-link takes several LLVM bitcode files and links them together into a single LLVM bitcode file. one file to rule them all, periodt πŸ‘‘

and where does it go? it writes the output file to standard output, unless you use the -o option to specify a filename. no -o, no file, it just yeets itself at your stdout πŸ’€


πŸŽ€ OPTIONS πŸŽ€

  • -f β€” enable binary output on terminals. normally llvm-link will refuse to write raw bitcode output if the output stream is a terminal (protection, honestly πŸ›‘οΈ). with this option, llvm-link will write raw bitcode regardless of the output device. chaos mode: unlocked πŸ”₯
  • -o filename β€” specify the output file name. and if filename is -, then llvm-link will write its output to standard output. cute shortcut, iykyk πŸ’…
  • -S β€” write output in LLVM intermediate language (instead of bitcode). readable-ish, we love her 🌈
  • -d β€” if specified, llvm-link prints a human-readable version of the output bitcode file to standard error. not stdout, bestie β€” stderr πŸ™ˆ
  • --help β€” print a summary of command line options. the "help me i'm baby" flag 🍼
  • -v β€” verbose mode. print information about what llvm-link is doing. this typically includes a message for each bitcode file linked in and for each library found. she's narrating her life and honestly? go off πŸ‘‘
  • --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 β€” listen β€” if a symbol is declared more than twice, the definition from the file declared last takes precedence. last one wins, always πŸ‘€
  • --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. plug in as many as you want πŸ”Œ
  • --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. no index, no import β€” them's the rules ⚠️
  • --internalize β€” internalize the linked symbols. making them shy 🫣
  • --disable-debug-info-type-map β€” disables the use of a uniquing type map for debug info.
  • --only-needed β€” link only needed symbols. minimalism core πŸŽ€
  • --disable-lazy-loading β€” disable lazy module loading. no procrastination allowed 😀
  • --suppress-warnings β€” suppress all linker warnings. living in denial, but make it a flag πŸ™ˆ
  • --preserve-bc-uselistorder β€” preserve the use-list order when writing LLVM bitcode.
  • --preserve-ll-uselistorder β€” preserve the use-list order when writing LLVM assembly.
  • --ignore-non-bitcode β€” do not error out when a non-bitcode file is encountered while processing an archive. she's chill like that 🧚

πŸ’– EXIT STATUS πŸ’–

if llvm-link succeeds, it will exit with 0. otherwise, if an error occurs, it will exit with a non-zero value. zero = slay, non-zero = something's wrong and she's telling you about it 😭


πŸ‘‘ Author πŸ‘‘

maintained by the LLVM Team (https://llvm.org/). absolute icons, no cap πŸ’œ


2003-2026, LLVM Project


and that's the whole page, bestie β€” footer deets for the archive girlies: this is LLVM version 15, dated 2026-09-09, page LLVM-LINK(1). go forth and link responsibly πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from