Skip to content

Commit

Permalink
Use ".ll" as default suffix of LLVM assembly file
Browse files Browse the repository at this point in the history
This commit is a follow up of Issue rust-lang#1147.

Althought there are some inconsistency about this naming convention in
LLVM. For example, `clang' write LLVM assembly to a file with ".s" suffix,
while both `llvm-dis' and `opt' write to files with ".ll" suffices. We
think ".ll" makes more sense.

Also rustc manual page is updated.
  • Loading branch information
lht authored and brson committed Nov 8, 2011
1 parent 8857657 commit 2532423
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions man/rustc.1
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ output filename for \fBfoo.rs\fR is otherwise \fBfoo\fR plus any
platform-specific extension (when compiling a binary), a
platform-specific name, e.g. \fBlibfoo.so\fR (when compiling a
library), \fBfoo.o\fR (when using \fB-c\fR), \fBfoo.s\fR (when using
\fB-S\fR) or \fBfoo.bc\fR (when using \fB--emit-llvm\fR), and
\fB-S\fR) or \fBfoo.bc\fR (when using \fB--emit-llvm\fR), and \fBfoo.ll\fR
(when using both \fB-S\fR and \fB--emit-llvm\fR).
.TP
\fB--lib\fR:
Compile and link a library crate into a shared object.
Expand Down Expand Up @@ -82,7 +83,9 @@ Compile to assembly, but do not assemble or link.
Compile and assemble, but do not link.
.TP
\fB--emit-llvm\fR:
Generate llvm bitcode.
Generate output files in LLVM format. When used with \fB-S\fR this generate LLVM
intermediate language assembly files, otherwise this generates LLVM bitcode
format object files.
.TP
\fB--save-temps\fR:
For foo.rs, save generated bitcode before optimization to
Expand Down
2 changes: 1 addition & 1 deletion src/comp/driver/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ fn build_output_filenames(ifile: str, ofile: option::t<str>,
link::output_type_none. { "none" }
link::output_type_bitcode. { "bc" }
link::output_type_assembly. { "s" }
link::output_type_llvm_assembly. { "s" }
link::output_type_llvm_assembly. { "ll" }
// Object and exe output both use the '.o' extension here
link::output_type_object. | link::output_type_exe. {
"o"
Expand Down

0 comments on commit 2532423

Please sign in to comment.