parent
df997e53af
commit
6ebbc6c4a3
2 changed files with 14 additions and 4 deletions
|
@ -937,7 +937,16 @@ pub fn filename_for_input(sess: &Session,
|
|||
config::CrateTypeStaticlib => {
|
||||
out_filename.with_filename(format!("lib{}.a", libname))
|
||||
}
|
||||
config::CrateTypeExecutable => out_filename.clone(),
|
||||
config::CrateTypeExecutable => {
|
||||
match sess.targ_cfg.os {
|
||||
abi::OsWin32 => out_filename.with_extension("exe"),
|
||||
abi::OsMacos |
|
||||
abi::OsLinux |
|
||||
abi::OsAndroid |
|
||||
abi::OsFreebsd |
|
||||
abi::OsiOS => out_filename.clone(),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
|
||||
all:
|
||||
[ `$(RUSTC) --print-crate-name crate.rs` = "foo" ]
|
||||
[ `$(RUSTC) --print-file-name crate.rs` = "foo" ]
|
||||
[ `$(RUSTC) --print-file-name --crate-type=lib --test crate.rs` = "foo" ]
|
||||
[ `$(RUSTC) --print-file-name --test lib.rs` = "mylib" ]
|
||||
[ `$(RUSTC) --print-file-name crate.rs` = "$(call BIN,foo)" ]
|
||||
[ `$(RUSTC) --print-file-name --crate-type=lib \
|
||||
--test crate.rs` = "$(call BIN,foo)" ]
|
||||
[ `$(RUSTC) --print-file-name --test lib.rs` = "$(call BIN,mylib)" ]
|
||||
$(RUSTC) --print-file-name lib.rs
|
||||
$(RUSTC) --print-file-name rlib.rs
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue