File tree Expand file tree Collapse file tree 4 files changed +64
-0
lines changed
compiler/rustc_target/src/spec Expand file tree Collapse file tree 4 files changed +64
-0
lines changed Original file line number Diff line number Diff line change @@ -1605,6 +1605,7 @@ supported_targets! {
16051605 ( "aarch64-uwp-windows-msvc" , aarch64_uwp_windows_msvc) ,
16061606 ( "x86_64-pc-windows-msvc" , x86_64_pc_windows_msvc) ,
16071607 ( "x86_64-uwp-windows-msvc" , x86_64_uwp_windows_msvc) ,
1608+ ( "x86_64-win7-windows-msvc" , x86_64_win7_windows_msvc) ,
16081609 ( "i686-pc-windows-msvc" , i686_pc_windows_msvc) ,
16091610 ( "i686-uwp-windows-msvc" , i686_uwp_windows_msvc) ,
16101611 ( "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 @@ -342,6 +342,7 @@ target | std | host | notes
342342[ ` x86_64-pc-nto-qnx710 ` ] ( platform-support/nto-qnx.md ) | ✓ | | x86 64-bit QNX Neutrino 7.1 RTOS |
343343[ ` x86_64-pc-windows-gnullvm ` ] ( platform-support/pc-windows-gnullvm.md ) | ✓ | ✓ |
344344` x86_64-pc-windows-msvc ` | * | | 64-bit Windows XP support
345+ [ ` x86_64-win7-windows-msvc ` ] ( platform-support/win7-windows-msvc.md ) | ✓ | | 64-bit Windows 7 support
345346` x86_64-sun-solaris ` | ? | | Deprecated target for 64-bit Solaris 10/11, illumos
346347[ ` x86_64-unikraft-linux-musl ` ] ( platform-support/unikraft-linux-musl.md ) | ✓ | | 64-bit Unikraft with musl
347348` x86_64-unknown-dragonfly ` | ✓ | ✓ | 64-bit DragonFlyBSD
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+ ```
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