File tree 2 files changed +14
-4
lines changed
test/run-make/crate-data-smoke
2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -937,7 +937,16 @@ pub fn filename_for_input(sess: &Session,
937
937
config:: CrateTypeStaticlib => {
938
938
out_filename. with_filename ( format ! ( "lib{}.a" , libname) )
939
939
}
940
- config:: CrateTypeExecutable => out_filename. clone ( ) ,
940
+ config:: CrateTypeExecutable => {
941
+ match sess. targ_cfg . os {
942
+ abi:: OsWin32 => out_filename. with_extension ( "exe" ) ,
943
+ abi:: OsMacos |
944
+ abi:: OsLinux |
945
+ abi:: OsAndroid |
946
+ abi:: OsFreebsd |
947
+ abi:: OsiOS => out_filename. clone ( ) ,
948
+ }
949
+ }
941
950
}
942
951
}
943
952
Original file line number Diff line number Diff line change 2
2
3
3
all :
4
4
[ ` $( RUSTC) --print-crate-name crate.rs` = " foo" ]
5
- [ ` $( RUSTC) --print-file-name crate.rs` = " foo" ]
6
- [ ` $( RUSTC) --print-file-name --crate-type=lib --test crate.rs` = " foo" ]
7
- [ ` $( RUSTC) --print-file-name --test lib.rs` = " mylib" ]
5
+ [ ` $( RUSTC) --print-file-name crate.rs` = " $( call BIN,foo) " ]
6
+ [ ` $( RUSTC) --print-file-name --crate-type=lib \
7
+ --test crate.rs` = " $( call BIN,foo) " ]
8
+ [ ` $( RUSTC) --print-file-name --test lib.rs` = " $( call BIN,mylib) " ]
8
9
$(RUSTC ) --print-file-name lib.rs
9
10
$(RUSTC ) --print-file-name rlib.rs
You can’t perform that action at this time.
0 commit comments