LLVM-LINK(1)

okay so this is the llvm-link page from the LLVM manual, and bestie, it's literally the glow-up station for your .bc files. grab a boba, we're linking. πŸ§‹βœ¨


✨ NAME ✨

llvm-link β€” the LLVM bitcode linker 🫢


🌸 SYNOPSIS 🌸

llvm-link [options] filename ...

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: you've got a whole pile of LLVM bitcode files and they're all sitting there, separate, not knowing each other. llvm-link walks in, takes all of them, and links them together into one single LLVM bitcode file. main character behavior, honestly. πŸ’…

and where does that gorgeous merged file go? to standard output, no cap β€” unless you use the -o option to name a filename. then it goes there instead. simple as that. πŸŽ€


πŸ‘‘ OPTIONS πŸ‘‘

  • -f β€” enables binary output on terminals. here's the tea: normally llvm-link will flat-out refuse to write raw bitcode output if the output stream is a terminal (it's just trying to protect you from a screen full of garbage, king behavior). with this option, llvm-link will write raw bitcode regardless of the output device. no thoughts, just bytes. πŸ”₯
  • -o filename β€” names your output file. and if filename is "-", then llvm-link writes its output to standard output instead. cute little dash, does a lot. ✨
  • -S β€” writes the output in LLVM intermediate language instead of bitcode. human-readable era. πŸ“–
  • -d β€” if you specify this, llvm-link prints a human-readable version of the output bitcode file to standard error. (yes, stderr. not stdout. we're being precise here.) 🌈
  • --help β€” prints a summary of the command line options. the classic "help me bestie" flag. 🫢
  • -v β€” verbose mode. prints info about what llvm-link is actually doing. typically this includes a message for each bitcode file linked in and for each library found. it's giving narrator energy. πŸŽ™οΈ
  • --override filename β€” adds the file you passed in to the link, and overrides symbols that have already been declared with the definitions in that file. you can specify this flag multiple times so multiple files act as overrides. and if a symbol gets declared more than twice? the definition from the file declared last takes precedence. last one in the door wins, periodt. πŸ’€
  • --import function:filename β€” specifies a function that should be imported from the specified file, for linking with ThinLTO. specify it multiple times to import multiple functions. stack 'em up. πŸ“
  • --summary-index filename β€” gives the path to a file containing the module summary index, with the results of an earlier ThinLTO link. required when --import is used, so don't skip it or things get messy. 🚨
  • --internalize β€” internalizes the linked symbols. 🧚
  • --disable-debug-info-type-map β€” disables the use of a uniquing type map for debug info. πŸ™ˆ
  • --only-needed β€” links only needed symbols. minimalism, but make it linker. ✨
  • --disable-lazy-loading β€” disables lazy module loading. no more waiting around. ⭐
  • --suppress-warnings β€” suppresses all linker warnings. silence is golden, allegedly. 🀫
  • --preserve-bc-uselistorder β€” preserves the use-list order when writing LLVM bitcode. πŸŽ€
  • --preserve-ll-uselistorder β€” preserves the use-list order when writing LLVM assembly. (yes, ll not bc β€” two different flags, two different vibes, do not mix them up bestie.) 🌸
  • --ignore-non-bitcode β€” do not error out when a non-bitcode file is encountered while processing an archive. it just... keeps going. resilience queen. πŸ’œ

πŸ’… EXIT STATUS πŸ’…

if llvm-link succeeds, it exits with 0. πŸŽ‰ otherwise, if an error occurs, it exits with a non-zero value. 😭


🫢 AUTHOR 🫢

maintained by the LLVM Team (https://llvm.org/). icons, all of them. πŸ‘‘


2003-2025, LLVM Project


and that's the whole page, bestie!! this was the LLVM llvm-link(1) manual, version 20, dated 2025-09-03 β€” go link something iconic and hydrate. mwah. πŸ’–πŸŒˆπŸ¦‹

πŸ“¦ where this page comes from