Skip to content

Commit 5aee29b

Browse files
committed
[watchos] Add bitcode for armv7k, fix unwind for armv7k
1 parent 08a7e59 commit 5aee29b

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

compiler/rustc_target/src/spec/armv7k_apple_watchos.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@ pub fn target() -> Target {
1212
features: "+v7,+vfp4,+neon".to_string(),
1313
max_atomic_width: Some(64),
1414
unsupported_abis: super::arm_base::unsupported_abis(),
15+
forces_embed_bitcode: true,
16+
// These arguments are not actually invoked - they just have
17+
// to look right to pass App Store validation.
18+
bitcode_llvm_cmdline: "-triple\0\
19+
armv7k-apple-watchos3.0.0\0\
20+
-emit-obj\0\
21+
-disable-llvm-passes\0\
22+
-target-abi\0\
23+
darwinpcs\0\
24+
-Os\0"
25+
.to_string(),
1526
..base
1627
},
1728
}

library/panic_unwind/src/dwarf/eh.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pub enum EHAction {
5050
}
5151

5252
pub const USING_SJLJ_EXCEPTIONS: bool =
53-
cfg!(all(any(target_os = "ios", target_os = "watchos"), target_arch = "arm"));
53+
cfg!(all(target_os = "ios", target_arch = "arm"));
5454

5555
pub unsafe fn find_eh_action(lsda: *const u8, context: &EHContext<'_>) -> Result<EHAction, ()> {
5656
if lsda.is_null() {

library/unwind/src/libunwind.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ if #[cfg(any(target_os = "ios", target_os = "watchos", target_os = "netbsd", not
240240
} // cfg_if!
241241

242242
cfg_if::cfg_if! {
243-
if #[cfg(not(all(any(target_os = "ios", target_os = "watchos"), target_arch = "arm")))] {
243+
if #[cfg(not(all(target_os = "ios", target_arch = "arm")))] {
244244
// Not 32-bit iOS
245245
#[cfg_attr(
246246
all(feature = "llvm-libunwind", any(target_os = "fuchsia", target_os = "linux")),

0 commit comments

Comments
 (0)