From dd96e0b58dd747350864fafe4a079fc2380b7803 Mon Sep 17 00:00:00 2001 From: TimTheBig <132001783+TimTheBig@users.noreply.github.com> Date: Thu, 18 Apr 2024 11:49:09 -0400 Subject: [PATCH 1/8] Update platform-support.md --- src/doc/rustc/src/platform-support.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md index f7836f18cf9d1..d2fbdea02717a 100644 --- a/src/doc/rustc/src/platform-support.md +++ b/src/doc/rustc/src/platform-support.md @@ -86,7 +86,7 @@ so Rustup may install the documentation for a similar tier 1 target instead. target | notes -------|------- -`aarch64-apple-darwin` | ARM64 macOS (11.0+, Big Sur+) +[`aarch64-apple-darwin`](platform-support/aarch64-apple-darwin.md) | ARM64 macOS (11.0+, Big Sur+) `aarch64-pc-windows-msvc` | ARM64 Windows MSVC `aarch64-unknown-linux-musl` | ARM64 Linux with musl 1.2.3 `arm-unknown-linux-gnueabi` | ARMv6 Linux (kernel 3.2, glibc 2.17) From 15019cb782ae978467d52f697ee5396e88889a57 Mon Sep 17 00:00:00 2001 From: TimTheBig <132001783+TimTheBig@users.noreply.github.com> Date: Thu, 18 Apr 2024 11:54:14 -0400 Subject: [PATCH 2/8] Create aarch64-apple-darwin.md --- .../platform-support/aarch64-apple-darwin.md | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 src/doc/rustc/src/platform-support/aarch64-apple-darwin.md diff --git a/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md b/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md new file mode 100644 index 0000000000000..703d31eb8aac7 --- /dev/null +++ b/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md @@ -0,0 +1,52 @@ +# `aarch64-apple-darwin` + +**Tier: 2 with host tools** + +One-sentence description of the target (e.g. CPU, OS) + +## Target maintainers + +- ??? + +## Requirements + +Does the target support host tools, or only cross-compilation? Does the target +support std, or alloc (either with a default allocator, or if the user supplies +an allocator)? + +Document the expectations of binaries built for the target. Do they assume +specific minimum features beyond the baseline of the CPU/environment/etc? What +version of the OS or environment do they expect? + +Are there notable `#[target_feature(...)]` or `-C target-feature=` values that +programs may wish to use? + +What calling convention does `extern "C"` use on the target? + +What format do binaries use by default? ELF, PE, something else? + +## Building the target + +If Rust doesn't build the target by default, how can users build it? Can users +just add it to the `target` list in `config.toml`? + +## Building Rust programs + +Rust does not yet ship pre-compiled artifacts for this target. To compile for +this target, you will either need to build Rust with the target enabled (see +"Building the target" above), or build your own copy of `core` by using +`build-std` or similar. + +## Testing + +Does the target support running binaries, or do binaries have varying +expectations that prevent having a standard way to run them? If users can run +binaries, can they do so in some common emulator, or do they need native +hardware? Does the target support running the Rust testsuite? + +## Cross-compilation toolchains and C code + +Does the target support C code? If so, what toolchain target should users use +to build compatible C code? (This may match the target triple, or it may be a +toolchain for a different target triple, potentially with specific options or +caveats.) From 5742520ae0394d7e73c78c88c18576fe5c66fcc4 Mon Sep 17 00:00:00 2001 From: TimTheBig <132001783+TimTheBig@users.noreply.github.com> Date: Thu, 18 Apr 2024 15:03:53 -0400 Subject: [PATCH 3/8] Update aarch64-apple-darwin.md --- .../platform-support/aarch64-apple-darwin.md | 35 +++++++------------ 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md b/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md index 703d31eb8aac7..67008ae42c4af 100644 --- a/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md +++ b/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md @@ -2,7 +2,7 @@ **Tier: 2 with host tools** -One-sentence description of the target (e.g. CPU, OS) +64-bit ARM-based Apple devices running macOS, Macs with Apple Silicon M1 or M2 chips. M3 is [`arm64e-apple-darwin`](platform-support/arm64e-apple-darwin.md). ## Target maintainers @@ -10,39 +10,30 @@ One-sentence description of the target (e.g. CPU, OS) ## Requirements -Does the target support host tools, or only cross-compilation? Does the target -support std, or alloc (either with a default allocator, or if the user supplies -an allocator)? +This target supports host tools and cross-compilation. It provides the full standard library including std and alloc. -Document the expectations of binaries built for the target. Do they assume -specific minimum features beyond the baseline of the CPU/environment/etc? What -version of the OS or environment do they expect? +Binaries built for this target expect a Apple Silicon Mac. -Are there notable `#[target_feature(...)]` or `-C target-feature=` values that -programs may wish to use? +### Format -What calling convention does `extern "C"` use on the target? - -What format do binaries use by default? ELF, PE, something else? +The default binary format is Mach-O, the executable format used on Apple's platforms. ## Building the target -If Rust doesn't build the target by default, how can users build it? Can users -just add it to the `target` list in `config.toml`? +Just add it to the `target` with: +``` +rustup target add aarch64-apple-darwin +``` ## Building Rust programs -Rust does not yet ship pre-compiled artifacts for this target. To compile for -this target, you will either need to build Rust with the target enabled (see -"Building the target" above), or build your own copy of `core` by using -`build-std` or similar. +Rust ships pre-compiled artifacts for this target or build your own copy of `core` by using +`build-std`. ## Testing -Does the target support running binaries, or do binaries have varying -expectations that prevent having a standard way to run them? If users can run -binaries, can they do so in some common emulator, or do they need native -hardware? Does the target support running the Rust testsuite? +Binaries produced for this target can be run directly on Apple Silicon Macs natively. +The Rust test suite can be run for this target on such hardware. ## Cross-compilation toolchains and C code From 0800f7501c1ad03c47e724fa327135226ddb4f40 Mon Sep 17 00:00:00 2001 From: TimTheBig <132001783+TimTheBig@users.noreply.github.com> Date: Thu, 18 Apr 2024 15:05:00 -0400 Subject: [PATCH 4/8] Update aarch64-apple-darwin.md --- src/doc/rustc/src/platform-support/aarch64-apple-darwin.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md b/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md index 67008ae42c4af..f57dccd921eb7 100644 --- a/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md +++ b/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md @@ -37,7 +37,4 @@ The Rust test suite can be run for this target on such hardware. ## Cross-compilation toolchains and C code -Does the target support C code? If so, what toolchain target should users use -to build compatible C code? (This may match the target triple, or it may be a -toolchain for a different target triple, potentially with specific options or -caveats.) +This target supports C code. To build compatible C code, you should use a toolchain targeting aarch64-apple-darwin, such as Xcode on a Mac or GCC. The toolchain target triple matches this Rust target triple. From c174e126907bb812a31e6492a41b088b43d18efa Mon Sep 17 00:00:00 2001 From: TimTheBig <132001783+TimTheBig@users.noreply.github.com> Date: Thu, 18 Apr 2024 15:19:31 -0400 Subject: [PATCH 5/8] Update aarch64-apple-darwin.md --- src/doc/rustc/src/platform-support/aarch64-apple-darwin.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md b/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md index f57dccd921eb7..b11284b704715 100644 --- a/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md +++ b/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md @@ -2,7 +2,7 @@ **Tier: 2 with host tools** -64-bit ARM-based Apple devices running macOS, Macs with Apple Silicon M1 or M2 chips. M3 is [`arm64e-apple-darwin`](platform-support/arm64e-apple-darwin.md). +64-bit ARM-based Apple devices running macOS, Macs with M1 or M2 Apple Silicon chips. M3 or higher is [`arm64e-apple-darwin`](platform-support/arm64e-apple-darwin.md). ## Target maintainers @@ -12,7 +12,7 @@ This target supports host tools and cross-compilation. It provides the full standard library including std and alloc. -Binaries built for this target expect a Apple Silicon Mac. +Binaries built for this target expect a Apple Silicon Mac on macOS 11.0 Big Sur+. ### Format From 61a5eede26ad2517040c1c62c46818dbefdca23c Mon Sep 17 00:00:00 2001 From: TimTheBig <132001783+TimTheBig@users.noreply.github.com> Date: Thu, 18 Apr 2024 16:41:17 -0400 Subject: [PATCH 6/8] Update aarch64-apple-darwin.md --- src/doc/rustc/src/platform-support/aarch64-apple-darwin.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md b/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md index b11284b704715..9932cca4cb049 100644 --- a/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md +++ b/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md @@ -20,7 +20,7 @@ The default binary format is Mach-O, the executable format used on Apple's platf ## Building the target -Just add it to the `target` with: +Just add it to the `target` with: ``` rustup target add aarch64-apple-darwin ``` @@ -32,9 +32,10 @@ Rust ships pre-compiled artifacts for this target or build your own copy of `cor ## Testing -Binaries produced for this target can be run directly on Apple Silicon Macs natively. +Binaries produced for this target can be run directly on Apple Silicon Macs natively. The Rust test suite can be run for this target on such hardware. ## Cross-compilation toolchains and C code -This target supports C code. To build compatible C code, you should use a toolchain targeting aarch64-apple-darwin, such as Xcode on a Mac or GCC. The toolchain target triple matches this Rust target triple. +This target supports C code. To build compatible C code, you should use a toolchain targeting aarch64-apple-darwin, such as Xcode on a Mac or GCC. +The toolchain target triple matches this Rust target triple. From dc2a6779a1030b348f5ac46ea3db7b500dd0e52e Mon Sep 17 00:00:00 2001 From: TimTheBig <132001783+TimTheBig@users.noreply.github.com> Date: Fri, 19 Apr 2024 20:41:04 -0400 Subject: [PATCH 7/8] Update src/doc/rustc/src/platform-support/aarch64-apple-darwin.md Co-authored-by: Laine Taffin Altman --- src/doc/rustc/src/platform-support/aarch64-apple-darwin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md b/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md index 9932cca4cb049..e89eff4456704 100644 --- a/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md +++ b/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md @@ -2,7 +2,7 @@ **Tier: 2 with host tools** -64-bit ARM-based Apple devices running macOS, Macs with M1 or M2 Apple Silicon chips. M3 or higher is [`arm64e-apple-darwin`](platform-support/arm64e-apple-darwin.md). +64-bit Arm-based Apple devices running macOS: Macs with M1-family or later Apple Silicon CPUs. ## Target maintainers From 124eeae731cf4efdf4b875851f9f0af039f2703d Mon Sep 17 00:00:00 2001 From: TimTheBig <132001783+TimTheBig@users.noreply.github.com> Date: Sat, 20 Apr 2024 16:02:06 -0400 Subject: [PATCH 8/8] Update aarch64-apple-darwin.md --- src/doc/rustc/src/platform-support/aarch64-apple-darwin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md b/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md index e89eff4456704..74e1517f81f0f 100644 --- a/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md +++ b/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md @@ -21,7 +21,7 @@ The default binary format is Mach-O, the executable format used on Apple's platf ## Building the target Just add it to the `target` with: -``` +```sh rustup target add aarch64-apple-darwin ```