Skip to content

Commit 5bfb7e7

Browse files
committed
Add target thumbv7a-uwp-windows-msvc
1 parent 09c817e commit 5bfb7e7

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

src/librustc_codegen_ssa/back/link.rs

+1
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ fn get_linker(sess: &Session, linker: &Path, flavor: LinkerFlavor) -> Command {
181181
"x86_64" => Some("x64".to_string()),
182182
"x86" => Some("x86".to_string()),
183183
"aarch64" => Some("arm64".to_string()),
184+
"arm" => Some("arm".to_string()),
184185
_ => None,
185186
};
186187
if let Some(ref a) = arch {

src/librustc_target/spec/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,7 @@ supported_targets! {
530530
("i686-uwp-windows-msvc", i686_uwp_windows_msvc),
531531
("i586-pc-windows-msvc", i586_pc_windows_msvc),
532532
("thumbv7a-pc-windows-msvc", thumbv7a_pc_windows_msvc),
533+
("thumbv7a-uwp-windows-msvc", thumbv7a_uwp_windows_msvc),
533534

534535
("asmjs-unknown-emscripten", asmjs_unknown_emscripten),
535536
("wasm32-unknown-emscripten", wasm32_unknown_emscripten),
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
use crate::spec::{LinkerFlavor, PanicStrategy, Target, TargetOptions, TargetResult};
2+
3+
pub fn target() -> TargetResult {
4+
let mut base = super::windows_uwp_msvc_base::opts();
5+
base.max_atomic_width = Some(64);
6+
base.has_elf_tls = true;
7+
8+
// FIXME(jordanrh): use PanicStrategy::Unwind when SEH is
9+
// implemented for windows/arm in LLVM
10+
base.panic_strategy = PanicStrategy::Abort;
11+
12+
Ok(Target {
13+
llvm_target: "thumbv7a-pc-windows-msvc".to_string(),
14+
target_endian: "little".to_string(),
15+
target_pointer_width: "32".to_string(),
16+
target_c_int_width: "32".to_string(),
17+
data_layout: "e-m:w-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
18+
arch: "arm".to_string(),
19+
target_os: "windows".to_string(),
20+
target_env: "msvc".to_string(),
21+
target_vendor: "uwp".to_string(),
22+
linker_flavor: LinkerFlavor::Msvc,
23+
options: TargetOptions {
24+
features: "+vfp3,+neon".to_string(),
25+
cpu: "generic".to_string(),
26+
abi_blacklist: super::arm_base::abi_blacklist(),
27+
..base
28+
},
29+
})
30+
}

0 commit comments

Comments
 (0)