1 | use crate::spec::{LinkerFlavor, Lld, RustcAbi, SanitizerSet, Target, TargetMetadata, base}; |
---|---|
2 | |
3 | pub(crate) fn target() -> Target { |
4 | let mut base = base::windows_msvc::opts(); |
5 | base.rustc_abi = Some(RustcAbi::X86Sse2); |
6 | base.cpu = "pentium4".into(); |
7 | base.max_atomic_width = Some(64); |
8 | base.supported_sanitizers = SanitizerSet::ADDRESS; |
9 | |
10 | base.add_pre_link_args( |
11 | LinkerFlavor::Msvc(Lld::No), |
12 | &[ |
13 | // Mark all dynamic libraries and executables as compatible with the larger 4GiB address |
14 | // space available to x86 Windows binaries on x86_64. |
15 | "/LARGEADDRESSAWARE", |
16 | // Ensure the linker will only produce an image if it can also produce a table of |
17 | // the image's safe exception handlers. |
18 | // https://docs.microsoft.com/en-us/cpp/build/reference/safeseh-image-has-safe-exception-handlers |
19 | "/SAFESEH", |
20 | ], |
21 | ); |
22 | |
23 | Target { |
24 | llvm_target: "i686-pc-windows-msvc".into(), |
25 | metadata: TargetMetadata { |
26 | description: Some("32-bit MSVC (Windows 10+)".into()), |
27 | tier: Some(1), |
28 | host_tools: Some(true), |
29 | std: Some(true), |
30 | }, |
31 | pointer_width: 32, |
32 | data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ |
33 | i64:64-i128:128-f80:128-n8:16:32-a:0:32-S32" |
34 | .into(), |
35 | arch: "x86".into(), |
36 | options: base, |
37 | } |
38 | } |
39 |
Definitions
Learn Rust with the experts
Find out more