]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs
Rollup merge of #104416 - clubby789:fix-104414, r=eholk
[rust.git] / compiler / rustc_target / src / spec / i686_uwp_windows_gnu.rs
1 use crate::spec::{Cc, FramePointer, LinkerFlavor, Lld, Target};
2
3 pub fn target() -> Target {
4     let mut base = super::windows_uwp_gnu_base::opts();
5     base.cpu = "pentium4".into();
6     base.max_atomic_width = Some(64);
7     base.frame_pointer = FramePointer::Always; // Required for backtraces
8
9     // Mark all dynamic libraries and executables as compatible with the larger 4GiB address
10     // space available to x86 Windows binaries on x86_64.
11     base.add_pre_link_args(
12         LinkerFlavor::Gnu(Cc::No, Lld::No),
13         &["-m", "i386pe", "--large-address-aware"],
14     );
15     base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-Wl,--large-address-aware"]);
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 }