File tree Expand file tree Collapse file tree 7 files changed +72
-0
lines changed
compiler/rustc_target/src/spec Expand file tree Collapse file tree 7 files changed +72
-0
lines changed Original file line number Diff line number Diff line change @@ -1795,10 +1795,13 @@ supported_targets! {
1795
1795
( "x86_64-pc-windows-msvc" , x86_64_pc_windows_msvc) ,
1796
1796
( "x86_64-uwp-windows-msvc" , x86_64_uwp_windows_msvc) ,
1797
1797
( "x86_64-win7-windows-msvc" , x86_64_win7_windows_msvc) ,
1798
+ ( "x86_64-rust9x-windows-msvc" , x86_64_rust9x_windows_msvc) ,
1798
1799
( "i686-pc-windows-msvc" , i686_pc_windows_msvc) ,
1799
1800
( "i686-uwp-windows-msvc" , i686_uwp_windows_msvc) ,
1800
1801
( "i686-win7-windows-msvc" , i686_win7_windows_msvc) ,
1802
+ ( "i686-rust9x-windows-msvc" , i686_rust9x_windows_msvc) ,
1801
1803
( "i586-pc-windows-msvc" , i586_pc_windows_msvc) ,
1804
+ ( "i586-rust9x-windows-msvc" , i586_rust9x_windows_msvc) ,
1802
1805
( "thumbv7a-pc-windows-msvc" , thumbv7a_pc_windows_msvc) ,
1803
1806
( "thumbv7a-uwp-windows-msvc" , thumbv7a_uwp_windows_msvc) ,
1804
1807
Original file line number Diff line number Diff line change
1
+ use crate :: spec:: Target ;
2
+
3
+ pub ( crate ) fn target ( ) -> Target {
4
+ let mut base = super :: i686_rust9x_windows_msvc:: target ( ) ;
5
+ base. cpu = "pentium" . into ( ) ;
6
+ base. llvm_target = "i586-pc-windows-msvc" . into ( ) ;
7
+ base
8
+ }
Original file line number Diff line number Diff line change
1
+ use crate :: spec:: { LinkerFlavor , Lld , Target } ;
2
+
3
+ pub ( crate ) fn target ( ) -> Target {
4
+ let mut base = super :: i686_pc_windows_msvc:: target ( ) ;
5
+ base. vendor = "rust9x" . into ( ) ;
6
+
7
+ base. add_pre_link_args ( LinkerFlavor :: Msvc ( Lld :: No ) , & [
8
+ // "/LARGEADDRESSAWARE",
9
+ // "/SAFESEH",
10
+ // ↑ these are already added in the base target
11
+
12
+ // Link to ___CxxFrameHandler (XP and earlier MSVCRT) instead of ___CxxFrameHandler3.
13
+ // This cannot be done in the MSVC `eh_personality` handling because LLVM hardcodes SEH
14
+ // support based on that name, sadly
15
+ "/ALTERNATENAME:___CxxFrameHandler3=___CxxFrameHandler" ,
16
+ ] ) ;
17
+
18
+ base. metadata = crate :: spec:: TargetMetadata {
19
+ description : Some ( "32-bit MSVC rust9x (Windows 95/NT3.51+)" . into ( ) ) ,
20
+ tier : Some ( 4 ) ,
21
+ host_tools : Some ( false ) ,
22
+ std : Some ( true ) ,
23
+ } ;
24
+
25
+ base
26
+ }
Original file line number Diff line number Diff line change
1
+ use crate :: spec:: { LinkerFlavor , Lld , Target } ;
2
+
3
+ pub ( crate ) fn target ( ) -> Target {
4
+ let mut base = super :: x86_64_pc_windows_msvc:: target ( ) ;
5
+ // these aren't available on all x86_64 CPUs
6
+ // base.features = "+cx16,+sse3,+sahf".into();
7
+ base. plt_by_default = false ;
8
+ base. max_atomic_width = Some ( 64 ) ;
9
+ base. vendor = "rust9x" . into ( ) ;
10
+
11
+ base. add_pre_link_args ( LinkerFlavor :: Msvc ( Lld :: No ) , & [
12
+ // Link to ___CxxFrameHandler (XP and earlier MSVCRT) instead of ___CxxFrameHandler3.
13
+ // This cannot be done in the MSVC `eh_personality` handling because LLVM hardcodes SEH
14
+ // support based on that name, sadly
15
+ "/ALTERNATENAME:___CxxFrameHandler3=___CxxFrameHandler" ,
16
+ ] ) ;
17
+
18
+ base. metadata = crate :: spec:: TargetMetadata {
19
+ description : Some ( "64-bit MSVC rust9x (Windows XP 64bit+)" . into ( ) ) ,
20
+ tier : Some ( 4 ) ,
21
+ host_tools : Some ( false ) ,
22
+ std : Some ( true ) ,
23
+ } ;
24
+
25
+ base
26
+ }
Original file line number Diff line number Diff line change @@ -146,4 +146,5 @@ check-cfg = [
146
146
' cfg(feature, values(any()))' ,
147
147
# #[cfg(bootstrap)] rtems
148
148
' cfg(target_os, values("rtems"))' ,
149
+ ' cfg(target_vendor, values("rust9x"))' ,
149
150
]
Original file line number Diff line number Diff line change @@ -8,3 +8,8 @@ edition = "2021"
8
8
# Enable using raw-dylib for Windows imports.
9
9
# This will eventually be the default.
10
10
windows_raw_dylib = []
11
+
12
+ [lints .rust ]
13
+ unexpected_cfgs = { level = " allow" , check-cfg = [
14
+ ' cfg(target_vendor, values("rust9x"))' ,
15
+ ] }
Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ pub struct Finder {
34
34
// Targets can be removed from this list once they are present in the stage0 compiler (usually by updating the beta compiler of the bootstrap).
35
35
const STAGE0_MISSING_TARGETS : & [ & str ] = & [
36
36
// just a dummy comment so the list doesn't get onelined
37
+ "i586-rust9x-windows-msvc" ,
38
+ "i686-rust9x-windows-msvc" ,
39
+ "x86_64-rust9x-windows-msvc" ,
37
40
] ;
38
41
39
42
/// Minimum version threshold for libstdc++ required when using prebuilt LLVM
You can’t perform that action at this time.
0 commit comments