LLVM-AS(1)
π LLVM-AS(1) β the LLVM assembler, but make it make sense
okay so real talk, this is the llvm-as page from the LLVM manual set β yes, that LLVM, the big compiler-infrastructure one. it's short, it's sweet, and honestly it's kind of iconic. let's get into it π«Ά
β¨ SYNOPSIS β¨
llvm-as [options] [filename]
that's it. that's the whole vibe. options first, filename optional, we move π¦
πΈ DESCRIPTION πΈ
bestie. llvm-as is the LLVM assembler. that's the whole job. it reads a file full of human-readable LLVM assembly language, translates it into LLVM bitcode, and writes the result out β either into a file or straight to standard output. translating, slaying, periodt β¨
if filename is left out entirely, or if it's literally just -, then llvm-as reads its input from standard input. no filename? no problem. stdin is the main character π
and now the part everyone asks about β if you don't specify an output file with the -o option, llvm-as picks where the output goes by following these rules, in order, no cap:
- if the input is standard input, then the output is standard output. matching energies π
- if the input is a file that ends with
.ll, then the output file is the same name, except the suffix is changed to.bc. glow-up via extension swap π¦ - if the input is a file that does not end with the
.llsuffix, then the output file has the same name as the input file, except that the.bcsuffix is appended. so it just gets a little bonus tag at the end, we love that for it π
π₯ OPTIONS π₯
-fβ enable binary output on terminals. normallyllvm-asabsolutely refuses to write raw bitcode output if the output stream is a terminal (it's protecting you, it's giving protective bestie energy). with this option though,llvm-aswill write raw bitcode regardless of the output device. chaos mode: activated π-helpβ print a summary of command line options. your little cheat sheet, your lore dump, your iykyk π§-ofilename β specify the output file name. and if filename is-, thenllvm-assends its output to standard output. dash supremacy π
β EXIT STATUS β
if llvm-as succeeds, it will exit with 0. queen behavior, we stan π
otherwise, if an error occurs, it will exit with a non-zero value. π it happens to the best of us.
π¦ SEE ALSO π¦
(the reverse-direction bestie and the classic, respectively β go say hi π«Ά)
π AUTHOR π
maintained by the LLVM Team (https://llvm.org/). they're out here doing the work, respect on their name π
π COPYRIGHT π
2003-2026, LLVM Project
okay that's the whole page, you're officially educated β¨ and for the record, this was page 23, dated 2026-10-06, from the LLVM source β mwah, go compile something cute ππ
π¦ where this page comes from
- centos-stream 9: llvm 23.1.3-1.el9 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- centos-stream 9: llvm 23.1.3-1.el9 Β· Apache-2.0 WITH LLVM-exception OR NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms