Skip to content

Commit 97c84fb

Browse files
committed
Add i686-win7-windows-msvc target
1 parent 72c8507 commit 97c84fb

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

compiler/rustc_target/src/spec/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,6 +1608,7 @@ supported_targets! {
16081608
("x86_64-win7-windows-msvc", x86_64_win7_windows_msvc),
16091609
("i686-pc-windows-msvc", i686_pc_windows_msvc),
16101610
("i686-uwp-windows-msvc", i686_uwp_windows_msvc),
1611+
("i686-win7-windows-msvc", i686_win7_windows_msvc),
16111612
("i586-pc-windows-msvc", i586_pc_windows_msvc),
16121613
("thumbv7a-pc-windows-msvc", thumbv7a_pc_windows_msvc),
16131614
("thumbv7a-uwp-windows-msvc", thumbv7a_uwp_windows_msvc),
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
use crate::spec::{base, LinkerFlavor, Lld, Target};
2+
3+
pub fn target() -> Target {
4+
let mut base = base::windows_msvc::opts();
5+
base.cpu = "pentium4".into();
6+
base.max_atomic_width = Some(64);
7+
8+
base.add_pre_link_args(
9+
LinkerFlavor::Msvc(Lld::No),
10+
&[
11+
// Mark all dynamic libraries and executables as compatible with the larger 4GiB address
12+
// space available to x86 Windows binaries on x86_64.
13+
"/LARGEADDRESSAWARE",
14+
// Ensure the linker will only produce an image if it can also produce a table of
15+
// the image's safe exception handlers.
16+
// https://docs.microsoft.com/en-us/cpp/build/reference/safeseh-image-has-safe-exception-handlers
17+
"/SAFESEH",
18+
],
19+
);
20+
// Workaround for #95429
21+
base.has_thread_local = false;
22+
23+
Target {
24+
llvm_target: "i686-pc-windows-msvc".into(),
25+
pointer_width: 32,
26+
data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
27+
i64:64-f80:128-n8:16:32-a:0:32-S32"
28+
.into(),
29+
arch: "x86".into(),
30+
options: base,
31+
}
32+
}

src/doc/rustc/src/platform-support.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ target | std | host | notes
269269
[`i586-pc-nto-qnx700`](platform-support/nto-qnx.md) | * | | 32-bit x86 QNX Neutrino 7.0 RTOS [^x86_32-floats-return-ABI]
270270
`i686-apple-darwin` | ✓ | ✓ | 32-bit macOS (10.12+, Sierra+) [^x86_32-floats-return-ABI]
271271
`i686-pc-windows-msvc` | * | | 32-bit Windows XP support [^x86_32-floats-return-ABI]
272+
[`i686-win7-windows-msvc`](platform-support/win7-windows-msvc.md) | ✓ | | 32-bit Windows 7 support
272273
[`i686-pc-windows-gnullvm`](platform-support/pc-windows-gnullvm.md) | ✓ | ✓ | [^x86_32-floats-return-ABI]
273274
`i686-unknown-haiku` | ✓ | ✓ | 32-bit Haiku [^x86_32-floats-return-ABI]
274275
[`i686-unknown-hurd-gnu`](platform-support/hurd.md) | ✓ | ✓ | 32-bit GNU/Hurd [^x86_32-floats-return-ABI]

0 commit comments

Comments
 (0)