diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index a78df69f187ee..b688c97311a09 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -1578,6 +1578,7 @@ supported_targets! { ("armv7k-apple-watchos", armv7k_apple_watchos), ("arm64_32-apple-watchos", arm64_32_apple_watchos), ("x86_64-apple-watchos-sim", x86_64_apple_watchos_sim), + ("aarch64-apple-watchos", aarch64_apple_watchos), ("aarch64-apple-watchos-sim", aarch64_apple_watchos_sim), ("armebv7r-none-eabi", armebv7r_none_eabi), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_apple_watchos.rs b/compiler/rustc_target/src/spec/targets/aarch64_apple_watchos.rs new file mode 100644 index 0000000000000..b62666dcc7efa --- /dev/null +++ b/compiler/rustc_target/src/spec/targets/aarch64_apple_watchos.rs @@ -0,0 +1,19 @@ +use crate::spec::base::apple::{opts, Arch}; +use crate::spec::{Target, TargetOptions}; + +pub fn target() -> Target { + let base = opts("watchos", Arch::Arm64); + Target { + llvm_target: "aarch-apple-watchos".into(), + pointer_width: 64, + data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(), + arch: "aarch64".into(), + options: TargetOptions { + features: "+v8a,+neon,+fp-armv8,+apple-a7".into(), + max_atomic_width: Some(128), + dynamic_linking: false, + position_independent_executables: true, + ..base + }, + } +} diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md index 5535e69c86acd..1893a32270836 100644 --- a/src/doc/rustc/src/platform-support.md +++ b/src/doc/rustc/src/platform-support.md @@ -220,6 +220,7 @@ target | std | host | notes `aarch64-apple-ios-macabi` | ? | | Apple Catalyst on ARM64 [`aarch64-apple-tvos`](platform-support/apple-tvos.md) | ? | | ARM64 tvOS [`aarch64-apple-tvos-sim`](platform-support/apple-tvos.md) | ? | | ARM64 tvOS Simulator +[`aarch64-apple-watchos`](platform-support/apple-watchos.md) | ✓ | | ARM64 Apple WatchOS [`aarch64-apple-watchos-sim`](platform-support/apple-watchos.md) | ✓ | | ARM64 Apple WatchOS Simulator [`aarch64-kmc-solid_asp3`](platform-support/kmc-solid.md) | ✓ | | ARM64 SOLID with TOPPERS/ASP3 [`aarch64-nintendo-switch-freestanding`](platform-support/aarch64-nintendo-switch-freestanding.md) | * | | ARM64 Nintendo Switch, Horizon diff --git a/src/doc/rustc/src/platform-support/apple-watchos.md b/src/doc/rustc/src/platform-support/apple-watchos.md index fe4c7c0c88f6d..7be2467352c21 100644 --- a/src/doc/rustc/src/platform-support/apple-watchos.md +++ b/src/doc/rustc/src/platform-support/apple-watchos.md @@ -1,6 +1,7 @@ # *-apple-watchos - arm64_32-apple-watchos - armv7k-apple-watchos +- aarch64-apple-watchos - aarch64-apple-watchos-sim - x86_64-apple-watchos-sim @@ -9,6 +10,7 @@ Apple WatchOS targets: - Apple WatchOS on Arm 64_32 - Apple WatchOS on Arm v7k +- Apple WatchOS on Arm 64 - Apple WatchOS Simulator on arm64 - Apple WatchOS Simulator on x86_64 @@ -16,6 +18,7 @@ Apple WatchOS targets: * [@deg4uss3r](https://github.com/deg4uss3r) * [@vladimir-ea](https://github.com/vladimir-ea) +* [@leohowell](https://github.com/leohowell) ## Requirements