@@ -200,7 +200,7 @@ pub mod write {
200
200
// OSX has -dead_strip, which doesn't rely on ffunction_sections
201
201
// FIXME(#13846) this should be enabled for windows
202
202
let ffunction_sections = sess. targ_cfg . os != abi:: OsMacos &&
203
- sess. targ_cfg . os != abi:: OsWin32 ;
203
+ sess. targ_cfg . os != abi:: OsWindows ;
204
204
let fdata_sections = ffunction_sections;
205
205
206
206
let reloc_model = match sess. opts . cg . relocation_model . as_slice ( ) {
@@ -858,7 +858,7 @@ pub fn get_cc_prog(sess: &Session) -> String {
858
858
// instead of hard-coded gcc.
859
859
// For win32, there is no cc command, so we add a condition to make it use gcc.
860
860
match sess. targ_cfg . os {
861
- abi:: OsWin32 => "gcc" ,
861
+ abi:: OsWindows => "gcc" ,
862
862
_ => "cc" ,
863
863
} . to_string ( )
864
864
}
@@ -954,7 +954,7 @@ pub fn filename_for_input(sess: &Session,
954
954
}
955
955
config:: CrateTypeDylib => {
956
956
let ( prefix, suffix) = match sess. targ_cfg . os {
957
- abi:: OsWin32 => ( loader:: WIN32_DLL_PREFIX , loader:: WIN32_DLL_SUFFIX ) ,
957
+ abi:: OsWindows => ( loader:: WIN32_DLL_PREFIX , loader:: WIN32_DLL_SUFFIX ) ,
958
958
abi:: OsMacos => ( loader:: MACOS_DLL_PREFIX , loader:: MACOS_DLL_SUFFIX ) ,
959
959
abi:: OsLinux => ( loader:: LINUX_DLL_PREFIX , loader:: LINUX_DLL_SUFFIX ) ,
960
960
abi:: OsAndroid => ( loader:: ANDROID_DLL_PREFIX , loader:: ANDROID_DLL_SUFFIX ) ,
@@ -972,7 +972,7 @@ pub fn filename_for_input(sess: &Session,
972
972
}
973
973
config:: CrateTypeExecutable => {
974
974
match sess. targ_cfg . os {
975
- abi:: OsWin32 => out_filename. with_extension ( "exe" ) ,
975
+ abi:: OsWindows => out_filename. with_extension ( "exe" ) ,
976
976
abi:: OsMacos |
977
977
abi:: OsLinux |
978
978
abi:: OsAndroid |
@@ -1388,7 +1388,7 @@ fn link_args(cmd: &mut Command,
1388
1388
// subset we wanted.
1389
1389
//
1390
1390
// FIXME(#11937) we should invoke the system linker directly
1391
- if sess. targ_cfg . os != abi:: OsWin32 {
1391
+ if sess. targ_cfg . os != abi:: OsWindows {
1392
1392
cmd. arg ( "-nodefaultlibs" ) ;
1393
1393
}
1394
1394
@@ -1440,7 +1440,7 @@ fn link_args(cmd: &mut Command,
1440
1440
cmd. arg ( "-Wl,-dead_strip" ) ;
1441
1441
}
1442
1442
1443
- if sess. targ_cfg . os == abi:: OsWin32 {
1443
+ if sess. targ_cfg . os == abi:: OsWindows {
1444
1444
// Make sure that we link to the dynamic libgcc, otherwise cross-module
1445
1445
// DWARF stack unwinding will not work.
1446
1446
// This behavior may be overridden by --link-args "-static-libgcc"
@@ -1715,7 +1715,7 @@ fn add_upstream_rust_crates(cmd: &mut Command, sess: &Session,
1715
1715
1716
1716
// Converts a library file-stem into a cc -l argument
1717
1717
fn unlib < ' a > ( config : & config:: Config , stem : & ' a [ u8 ] ) -> & ' a [ u8 ] {
1718
- if stem. starts_with ( "lib" . as_bytes ( ) ) && config. os != abi:: OsWin32 {
1718
+ if stem. starts_with ( "lib" . as_bytes ( ) ) && config. os != abi:: OsWindows {
1719
1719
stem. tailn ( 3 )
1720
1720
} else {
1721
1721
stem
0 commit comments