Skip to content

Commit 398fb83

Browse files
committed
Add i686-win7-windows-msvc target
1 parent a01cf33 commit 398fb83

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

compiler/rustc_target/src/spec/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1607,6 +1607,7 @@ supported_targets! {
16071607
("x86_64-win7-windows-msvc", x86_64_win7_windows_msvc),
16081608
("i686-pc-windows-msvc", i686_pc_windows_msvc),
16091609
("i686-uwp-windows-msvc", i686_uwp_windows_msvc),
1610+
("i686-win7-windows-msvc", i686_win7_windows_msvc),
16101611
("i586-pc-windows-msvc", i586_pc_windows_msvc),
16111612
("thumbv7a-pc-windows-msvc", thumbv7a_pc_windows_msvc),
16121613
("thumbv7a-uwp-windows-msvc", thumbv7a_uwp_windows_msvc),
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

+1
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ target | std | host | notes
276276
[`i686-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | 32-bit OpenBSD [^x86_32-floats-return-ABI]
277277
`i686-uwp-windows-gnu` | ? | | [^x86_32-floats-return-ABI]
278278
`i686-uwp-windows-msvc` | ? | | [^x86_32-floats-return-ABI]
279+
[`i686-win7-windows-msvc`](platform-support/win7-windows-msvc.md) | ✓ | | 32-bit Windows 7 support
279280
`i686-wrs-vxworks` | ? | | [^x86_32-floats-return-ABI]
280281
[`m68k-unknown-linux-gnu`](platform-support/m68k-unknown-linux-gnu.md) | ? | | Motorola 680x0 Linux
281282
`mips-unknown-linux-gnu` | ✓ | ✓ | MIPS Linux (kernel 4.4, glibc 2.23)

0 commit comments

Comments
 (0)