2022-08-06 21:08:46 +03:00
|
|
|
use crate::spec::{LinkerFlavor, Lld, Target};
|
2015-06-25 15:32:10 -07:00
|
|
|
|
2020-10-05 15:37:55 +03:00
|
|
|
pub fn target() -> Target {
|
2015-06-25 15:32:10 -07:00
|
|
|
let mut base = super::windows_msvc_base::opts();
|
2022-03-22 11:43:05 +01:00
|
|
|
base.cpu = "pentium4".into();
|
2016-10-03 23:45:40 -05:00
|
|
|
base.max_atomic_width = Some(64);
|
2015-06-25 15:32:10 -07:00
|
|
|
|
2022-06-17 17:38:42 +03:00
|
|
|
base.add_pre_link_args(
|
2022-08-06 21:08:46 +03:00
|
|
|
LinkerFlavor::Msvc(Lld::No),
|
2022-06-17 17:38:42 +03:00
|
|
|
&[
|
|
|
|
|
// Mark all dynamic libraries and executables as compatible with the larger 4GiB address
|
|
|
|
|
// space available to x86 Windows binaries on x86_64.
|
|
|
|
|
"/LARGEADDRESSAWARE",
|
|
|
|
|
// Ensure the linker will only produce an image if it can also produce a table of
|
|
|
|
|
// the image's safe exception handlers.
|
|
|
|
|
// https://docs.microsoft.com/en-us/cpp/build/reference/safeseh-image-has-safe-exception-handlers
|
|
|
|
|
"/SAFESEH",
|
|
|
|
|
],
|
|
|
|
|
);
|
2022-03-29 12:37:20 +01:00
|
|
|
// Workaround for #95429
|
|
|
|
|
base.has_thread_local = false;
|
2016-02-09 17:20:32 +00:00
|
|
|
|
2020-10-05 15:37:55 +03:00
|
|
|
Target {
|
2022-03-22 11:43:05 +01:00
|
|
|
llvm_target: "i686-pc-windows-msvc".into(),
|
2020-10-14 18:08:12 +02:00
|
|
|
pointer_width: 32,
|
2020-01-07 21:26:52 +01:00
|
|
|
data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
|
2022-02-02 10:01:02 +01:00
|
|
|
i64:64-f80:128-n8:16:32-a:0:32-S32"
|
2022-03-22 11:43:05 +01:00
|
|
|
.into(),
|
|
|
|
|
arch: "x86".into(),
|
2015-06-25 15:32:10 -07:00
|
|
|
options: base,
|
2020-10-05 15:37:55 +03:00
|
|
|
}
|
2015-06-25 15:32:10 -07:00
|
|
|
}
|