]> git.proxmox.com Git - rustc.git/blame - compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs
New upstream version 1.64.0+dfsg1
[rustc.git] / compiler / rustc_target / src / spec / thumbv7a_pc_windows_msvc.rs
CommitLineData
064997fb 1use crate::spec::{LinkerFlavor, PanicStrategy, Target, TargetOptions};
b7449926 2
29967ef6 3pub fn target() -> Target {
b7449926 4 let mut base = super::windows_msvc_base::opts();
b7449926
XL
5 // Prevent error LNK2013: BRANCH24(T) fixup overflow
6 // The LBR optimization tries to eliminate branch islands,
7 // but if the displacement is larger than can fit
8 // in the instruction, this error will occur. The linker
9 // should be smart enough to insert branch islands only
10 // where necessary, but this is not the observed behavior.
11 // Disabling the LBR optimization works around the issue.
064997fb 12 base.add_pre_link_args(LinkerFlavor::Msvc, &["/OPT:NOLBR"]);
b7449926 13
29967ef6 14 Target {
5e7ed085 15 llvm_target: "thumbv7a-pc-windows-msvc".into(),
29967ef6 16 pointer_width: 32,
5e7ed085
FG
17 data_layout: "e-m:w-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
18 arch: "arm".into(),
b7449926 19 options: TargetOptions {
5e7ed085 20 features: "+vfp3,+neon".into(),
b7449926 21 max_atomic_width: Some(64),
136023e0
XL
22 // FIXME(jordanrh): use PanicStrategy::Unwind when SEH is
23 // implemented for windows/arm in LLVM
24 panic_strategy: PanicStrategy::Abort,
dfeec247
XL
25 ..base
26 },
29967ef6 27 }
b7449926 28}