]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs
Issue error when `-C link-self-contained` option is used on unsupported platforms
[rust.git] / compiler / rustc_target / src / spec / i686_pc_windows_msvc.rs
1 use crate::spec::{LinkerFlavor, Lld, Target};
2
3 pub fn target() -> Target {
4     let mut base = super::windows_msvc_base::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 }