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) 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..74e1517f81f0f --- /dev/null +++ b/src/doc/rustc/src/platform-support/aarch64-apple-darwin.md @@ -0,0 +1,41 @@ +# `aarch64-apple-darwin` + +**Tier: 2 with host tools** + +64-bit Arm-based Apple devices running macOS: Macs with M1-family or later Apple Silicon CPUs. + +## Target maintainers + +- ??? + +## Requirements + +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 on macOS 11.0 Big Sur+. + +### Format + +The default binary format is Mach-O, the executable format used on Apple's platforms. + +## Building the target + +Just add it to the `target` with: +```sh +rustup target add aarch64-apple-darwin +``` + +## Building Rust programs + +Rust ships pre-compiled artifacts for this target or build your own copy of `core` by using +`build-std`. + +## Testing + +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.