]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs
Auto merge of #2680 - RalfJung:rustup, r=RalfJung
[rust.git] / compiler / rustc_target / src / spec / i686_pc_windows_gnu.rs
1 use crate::spec::{Cc, FramePointer, LinkerFlavor, Lld, Target};
2
3 pub fn target() -> Target {
4     let mut base = super::windows_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     base.linker = Some("i686-w64-mingw32-gcc".into());
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.add_pre_link_args(
13         LinkerFlavor::Gnu(Cc::No, Lld::No),
14         &["-m", "i386pe", "--large-address-aware"],
15     );
16     base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-Wl,--large-address-aware"]);
17
18     Target {
19         llvm_target: "i686-pc-windows-gnu".into(),
20         pointer_width: 32,
21         data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
22             i64:64-f80:32-n8:16:32-a:0:32-S32"
23             .into(),
24         arch: "x86".into(),
25         options: base,
26     }
27 }