This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +65
-0
lines changed
compiler/rustc_target/src/spec Expand file tree Collapse file tree 5 files changed +65
-0
lines changed Original file line number Diff line number Diff line change @@ -1604,6 +1604,7 @@ supported_targets! {
16041604 ( "aarch64-uwp-windows-msvc" , aarch64_uwp_windows_msvc) ,
16051605 ( "x86_64-pc-windows-msvc" , x86_64_pc_windows_msvc) ,
16061606 ( "x86_64-uwp-windows-msvc" , x86_64_uwp_windows_msvc) ,
1607+ ( "x86_64-win7-windows-msvc" , x86_64_win7_windows_msvc) ,
16071608 ( "i686-pc-windows-msvc" , i686_pc_windows_msvc) ,
16081609 ( "i686-uwp-windows-msvc" , i686_uwp_windows_msvc) ,
16091610 ( "i586-pc-windows-msvc" , i586_pc_windows_msvc) ,
Original file line number Diff line number Diff line change 1+ use crate :: spec:: { base, Target } ;
2+
3+ pub fn target ( ) -> Target {
4+ let mut base = base:: windows_msvc:: opts ( ) ;
5+ base. cpu = "x86-64" . into ( ) ;
6+ base. plt_by_default = false ;
7+ base. max_atomic_width = Some ( 64 ) ;
8+ base. vendor = "win7" . into ( ) ;
9+
10+ Target {
11+ llvm_target : "x86_64-win7-windows-msvc" . into ( ) ,
12+ pointer_width : 64 ,
13+ data_layout : "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
14+ . into ( ) ,
15+ arch : "x86_64" . into ( ) ,
16+ options : base,
17+ }
18+ }
Original file line number Diff line number Diff line change 5555 - [ \* -unknown-uefi] ( platform-support/unknown-uefi.md )
5656 - [ wasm32-wasi-preview1-threads] ( platform-support/wasm32-wasi-preview1-threads.md )
5757 - [ wasm64-unknown-unknown] ( platform-support/wasm64-unknown-unknown.md )
58+ - [ \* -win7-windows-msvc] ( platform-support/win7-windows-msvc.md )
5859 - [ x86_64-fortanix-unknown-sgx] ( platform-support/x86_64-fortanix-unknown-sgx.md )
5960 - [ x86_64-unknown-none] ( platform-support/x86_64-unknown-none.md )
6061 - [ x86_64h-apple-darwin] ( platform-support/x86_64h-apple-darwin.md )
Original file line number Diff line number Diff line change @@ -351,6 +351,7 @@ target | std | host | notes
351351[ ` x86_64-unknown-openbsd ` ] ( platform-support/openbsd.md ) | ✓ | ✓ | 64-bit OpenBSD
352352` x86_64-uwp-windows-gnu ` | ✓ | |
353353` x86_64-uwp-windows-msvc ` | ✓ | |
354+ [ ` x86_64-win7-windows-msvc ` ] ( platform-support/win7-windows-msvc.md ) | ✓ | | 64-bit Windows 7 support
354355` x86_64-wrs-vxworks ` | ? | |
355356[ ` x86_64h-apple-darwin ` ] ( platform-support/x86_64h-apple-darwin.md ) | ✓ | ✓ | macOS with late-gen Intel (at least Haswell)
356357
Original file line number Diff line number Diff line change 1+ # * -win7-windows-msvc
2+
3+ ** Tier: 3**
4+
5+ Windows targets continuing support of windows7.
6+
7+ ## Target maintainers
8+
9+ - @roblabla
10+
11+ ## Requirements
12+
13+ This target supports full the entirety of std. This is automatically tested
14+ every night on private infrastructure. Host tools may also work, though those
15+ are not currently tested.
16+
17+ Those targets follow Windows calling convention for extern "C".
18+
19+ Like with any other Windows target created binaries are in PE format.
20+
21+ ## Building the target
22+
23+ You can build Rust with support for the targets by adding it to the target list in config.toml:
24+
25+ ``` toml
26+ [build ]
27+ build-stage = 1
28+ target = [ " x86_64-win7-windows-msvc" ]
29+ ```
30+
31+ ## Building Rust programs
32+
33+ Rust does not yet ship pre-compiled artifacts for this target. To compile for
34+ this target, you will either need to build Rust with the target enabled (see
35+ "Building the target" above), or build your own copy of ` core ` by using
36+ ` build-std ` or similar.
37+
38+ ## Testing
39+
40+ Created binaries work fine on Windows or Wine using native hardware.
41+
42+ ## Cross-compilation toolchains and C code
43+
44+ Compatible C code can be built with either MSVC's ` cl.exe ` or LLVM's clang-cl.
You can’t perform that action at this time.
0 commit comments