]> git.proxmox.com Git - rustc.git/blob - compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs
New upstream version 1.61.0+dfsg1
[rustc.git] / compiler / rustc_target / src / spec / i686_uwp_windows_gnu.rs
1 use crate::spec::{FramePointer, LinkerFlavor, LldFlavor, Target};
2
3 pub fn target() -> Target {
4 let mut base = super::windows_uwp_gnu_base::opts();
5 base.cpu = "pentium4".into();
6 base.pre_link_args.insert(LinkerFlavor::Lld(LldFlavor::Ld), vec!["-m".into(), "i386pe".into()]);
7 base.max_atomic_width = Some(64);
8 base.frame_pointer = FramePointer::Always; // Required for backtraces
9
10 // Mark all dynamic libraries and executables as compatible with the larger 4GiB address
11 // space available to x86 Windows binaries on x86_64.
12 base.pre_link_args
13 .entry(LinkerFlavor::Gcc)
14 .or_default()
15 .push("-Wl,--large-address-aware".into());
16
17 Target {
18 llvm_target: "i686-pc-windows-gnu".into(),
19 pointer_width: 32,
20 data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
21 i64:64-f80:32-n8:16:32-a:0:32-S32"
22 .into(),
23 arch: "x86".into(),
24 options: base,
25 }
26 }