1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 10:42:07 +02:00
tldr/pages/common/llvm-as.md
2021-09-18 12:53:12 +02:00

492 B

llvm-as

LLVM Intermediate Representation (.ll) to Bitcode (.bc) assembler. More information: https://llvm.org/docs/CommandGuide/llvm-as.html.

  • Assemble an IR file:

llvm-as -o {{path/to/out.bc}} {{path/to/source.ll}}

  • Assemble an IR file and include a module hash in the produced Bitcode file:

llvm-as --module-hash -o {{path/to/out.bc}} {{path/to/source.ll}}

  • Read an IR file from stdin and assemble it:

cat {{path/to/source.ll}} | llvm-as -o {{path/to/out.bc}}