about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-11-17 17:15:31 +0000
committerbors <bors@rust-lang.org>2022-11-17 17:15:31 +0000
commit83356b78c4ff3e7d84e977aa6143793545967301 (patch)
treeef97af3c35b3bdfcac12aa421555c607dbe74bac
parentb6097f2e1b2ca62e188ba53cf43bd66b06b36915 (diff)
parentdb99a89e38c806a3240098876a725ce4b24b4193 (diff)
downloadrust-83356b78c4ff3e7d84e977aa6143793545967301.tar.gz
rust-83356b78c4ff3e7d84e977aa6143793545967301.zip
Auto merge of #104361 - vladimir-ea:watchos_fix_linking, r=oli-obk
[watchos] Dynamic linking is not allowed for watchos targets

Dynamic linking of all apple targets was (re-) enabled in PR #100636. However, dynamic linking is not allowed on WatchOS so this broke the build of standard library for WatchOS.

This change disables dynamic linking for WatchOS non-simulator targets.
-rw-r--r--compiler/rustc_target/src/spec/arm64_32_apple_watchos.rs2
-rw-r--r--compiler/rustc_target/src/spec/armv7k_apple_watchos.rs2
2 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_target/src/spec/arm64_32_apple_watchos.rs b/compiler/rustc_target/src/spec/arm64_32_apple_watchos.rs
index 2cf2cbc7510..52ee68e7560 100644
--- a/compiler/rustc_target/src/spec/arm64_32_apple_watchos.rs
+++ b/compiler/rustc_target/src/spec/arm64_32_apple_watchos.rs
@@ -12,6 +12,8 @@ pub fn target() -> Target {
             features: "+neon,+fp-armv8,+apple-a7".into(),
             max_atomic_width: Some(128),
             forces_embed_bitcode: true,
+            dynamic_linking: false,
+            position_independent_executables: true,
             // These arguments are not actually invoked - they just have
             // to look right to pass App Store validation.
             bitcode_llvm_cmdline: "-triple\0\
diff --git a/compiler/rustc_target/src/spec/armv7k_apple_watchos.rs b/compiler/rustc_target/src/spec/armv7k_apple_watchos.rs
index 45ead8d65ab..6e1d00d1f6c 100644
--- a/compiler/rustc_target/src/spec/armv7k_apple_watchos.rs
+++ b/compiler/rustc_target/src/spec/armv7k_apple_watchos.rs
@@ -12,6 +12,8 @@ pub fn target() -> Target {
             features: "+v7,+vfp4,+neon".into(),
             max_atomic_width: Some(64),
             forces_embed_bitcode: true,
+            dynamic_linking: false,
+            position_independent_executables: true,
             // These arguments are not actually invoked - they just have
             // to look right to pass App Store validation.
             bitcode_llvm_cmdline: "-triple\0\