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 @@ -1825,10 +1825,13 @@ supported_targets! {
1825
1825
( "x86_64-pc-windows-msvc" , x86_64_pc_windows_msvc) ,
1826
1826
( "x86_64-uwp-windows-msvc" , x86_64_uwp_windows_msvc) ,
1827
1827
( "x86_64-win7-windows-msvc" , x86_64_win7_windows_msvc) ,
1828
+ ( "x86_64-rust9x-windows-msvc" , x86_64_rust9x_windows_msvc) ,
1828
1829
( "i686-pc-windows-msvc" , i686_pc_windows_msvc) ,
1829
1830
( "i686-uwp-windows-msvc" , i686_uwp_windows_msvc) ,
1830
1831
( "i686-win7-windows-msvc" , i686_win7_windows_msvc) ,
1832
+ ( "i686-rust9x-windows-msvc" , i686_rust9x_windows_msvc) ,
1831
1833
( "i586-pc-windows-msvc" , i586_pc_windows_msvc) ,
1834
+ ( "i586-rust9x-windows-msvc" , i586_rust9x_windows_msvc) ,
1832
1835
( "thumbv7a-pc-windows-msvc" , thumbv7a_pc_windows_msvc) ,
1833
1836
( "thumbv7a-uwp-windows-msvc" , thumbv7a_uwp_windows_msvc) ,
1834
1837
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 @@ -144,4 +144,5 @@ check-cfg = [
144
144
# and to the `backtrace` crate which messes-up with Cargo list
145
145
# of declared features, we therefor expect any feature cfg
146
146
' cfg(feature, values(any()))' ,
147
+ ' cfg(target_vendor, values("rust9x"))' ,
147
148
]
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 = " warn" , 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