1 use crate::spec::{LinkerFlavor, PanicStrategy, Target, TargetOptions, TargetResult};
3 pub fn target() -> TargetResult {
4 let mut base = super::windows_msvc_base::opts();
6 // Prevent error LNK2013: BRANCH24(T) fixup overflow
7 // The LBR optimization tries to eliminate branch islands,
8 // but if the displacement is larger than can fit
9 // in the instruction, this error will occur. The linker
10 // should be smart enough to insert branch islands only
11 // where necessary, but this is not the observed behavior.
12 // Disabling the LBR optimization works around the issue.
13 base.pre_link_args.get_mut(&LinkerFlavor::Msvc).unwrap().push("/OPT:NOLBR".to_string());
15 // FIXME(jordanrh): use PanicStrategy::Unwind when SEH is
16 // implemented for windows/arm in LLVM
17 base.panic_strategy = PanicStrategy::Abort;
20 llvm_target: "thumbv7a-pc-windows-msvc".to_string(),
21 target_endian: "little".to_string(),
22 target_pointer_width: "32".to_string(),
23 target_c_int_width: "32".to_string(),
24 data_layout: "e-m:w-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
25 arch: "arm".to_string(),
26 target_os: "windows".to_string(),
27 target_env: "msvc".to_string(),
28 target_vendor: "pc".to_string(),
29 linker_flavor: LinkerFlavor::Msvc,
31 options: TargetOptions {
32 features: "+vfp3,+neon".to_string(),
33 cpu: "generic".to_string(),
34 max_atomic_width: Some(64),
35 abi_blacklist: super::arm_base::abi_blacklist(),