LLVM-AS(1)
β¨ LLVM-AS(1) β¨
okay bestie, welcome to the LLVM manual, section 1 π this one's about llvm-as, and it's genuinely so much less scary than it sounds. buckle up π
π NAME
llvm-as β the LLVM assembler. that's it, that's the whole job. she assembles. she's iconic. π
πΈ SYNOPSIS
llvm-as [options] [filename]
π¦ DESCRIPTION
so llvm-as is the LLVM assembler, no cap. what she does is: you hand her a file full of human-readable LLVM assembly language, she translates it into LLVM bitcode, and then she writes the result out to a file or straight to standard output. translate + write, that's the whole vibe β¨
if filename is omitted, or if it's literally just -, then llvm-as reads her input from standard input. yes, the humble dash. she respects it. π«Ά
now, if you don't specify an output file with the -o option, llvm-as picks where her output goes by following these rules, and you're gonna want to know them because they're lowkey specific:
- if the input is standard input, then the output is standard output. matching energy π
- if the input is a file that ends with
.ll, then the output file is the same name, except the suffix gets changed to.bc. - 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 gets appended. not swapped, appended. important distinction bestie π
π OPTIONS
-fβ enables binary output on terminals. normally,llvm-aswill flat-out refuse to write raw bitcode output if the output stream is a terminal (she's got boundaries π§). with this option she'll write raw bitcode regardless of the output device. no thoughts, just bytes.-helpβ prints a summary of command line options. the classic cry for help, but make it documentation π-o filenameβ specifies the output file name. and iffilenameis-, thenllvm-assends her output to standard output. dash strikes again π
β EXIT STATUS
if llvm-as succeeds, she exits with 0. slay. π otherwise, if an error occurs, she exits with a non-zero value. so yeah, check that exit code, it's giving β¨communicationβ¨
π₯ SEE ALSO
(the squad. go say hi. iykyk π)
π AUTHOR
Maintained by the LLVM Team (https://llvm.org/). they're the ones keeping this whole thing running, respect π«‘
π COPYRIGHT
2003-2024, LLVM Project
and that's the page fr fr π this was LLVM, dated 2024-07-18, page 12 of the manual β tysm for reading, go assemble something gorgeous, mwah ππ
π¦ where this page comes from
- fedora 43: llvm12 12.0.1-12.fc41 Β· NCSA
- fedora 43: llvm12 12.0.1-12.fc41 Β· NCSA
- fedora 44: llvm12 12.0.1-12.fc41 Β· NCSA
- fedora 44: llvm12 12.0.1-12.fc41 Β· NCSA
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms