Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new tier 3 aarch64-apple-watchos target #119074

Merged
merged 1 commit into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the wrong target name.

$ rustc --print cfg --target aarch64-apple-watchos
error: could not create LLVM TargetMachine for triple: aarch-apple-watcho: No available targets are compatible with triple "aarch-apple-watchos"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry it's my mistake, fix pr: #119176

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
Loading