Skip to content

Commit

Permalink
Add new tier 3 aarch64-apple-watchos target
Browse files Browse the repository at this point in the history
  • Loading branch information
leohowell committed Dec 18, 2023
1 parent 8681e07 commit e57294c
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_target/src/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
19 changes: 19 additions & 0 deletions compiler/rustc_target/src/spec/targets/aarch64_apple_watchos.rs
Original file line number Diff line number Diff line change
@@ -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
},
}
}
1 change: 1 addition & 0 deletions src/doc/rustc/src/platform-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/doc/rustc/src/platform-support/apple-watchos.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -9,13 +10,15 @@
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

## Target maintainers

* [@deg4uss3r](https://github.com/deg4uss3r)
* [@vladimir-ea](https://github.com/vladimir-ea)
* [@leohowell](https://github.com/leohowell)

## Requirements

Expand Down

0 comments on commit e57294c

Please sign in to comment.