mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 18:23:49 +00:00
parent
df997e53af
commit
6ebbc6c4a3
@ -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…
Reference in New Issue
Block a user