Closed
Description
At present,
rustc foo.rs
emits a binary;rustc --emit-llvm foo.rs
emits LLVM bitcode;rustc -S foo.rs
emits the final Assembler code;rustc --emit-llvm -S foo.rs
emits LLVM IR.
This is madness!
Here is my desired behaviour:
rustc --emit-binary foo.rs
emits a binary;rustc --emit-llvm-bc foo.rs
emits LLVM bitcode;rustc --emit-asm foo.rs
emits the final Assembler code;rustc --emit-llvm-ir foo.rs
emits LLVM IR.
More than one of these options may be specified, in which case multiple things would be built; if no --emit-*
option is specified, it will of course default to --emit-binary
.
A brief look at the code suggests that at present it is only designed to produce one of these. An alternative, if staying within this constraint, would be --emit=(binary|llvm-(bc|ir)|asm)
; however, I feel allowing multiple outputs would be nicer, though I guess just -o
wouldn't cut it.