Files
tldr/pages.zh/common/llvm-as.md

16 lines
498 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# llvm-as
> LLVM 中间表示(`.ll`)到 Bitcode`.bc`)的汇编器。
> 更多信息:<https://llvm.org/docs/CommandGuide/llvm-as.html>。
- 汇编一个 IR 文件:
`llvm-as -o {{path/to/out.bc}} {{path/to/source.ll}}`
- 汇编一个 IR 文件并在生成的 Bitcode 文件中包含模块哈希:
`llvm-as --module-hash -o {{path/to/out.bc}} {{path/to/source.ll}}`
-`stdin` 读取一个 IR 文件并进行汇编:
`cat {{path/to/source.ll}} | llvm-as -o {{path/to/out.bc}}`