about summary refs log tree commit diff
path: root/src/doc/rustc
diff options
context:
space:
mode:
authorThom Chiovoloni <thom@shift.click>2023-03-14 21:24:49 -0700
committerThom Chiovoloni <thom@shift.click>2023-06-21 14:59:39 -0700
commitdf9640211d5ba4d2fbafd8cd42c3fa61076185fc (patch)
tree74773006427f6d1699673fe061263bdfdde1283d /src/doc/rustc
parentabb191168222e57c2adb3874b7955b37d3021abb (diff)
downloadrust-df9640211d5ba4d2fbafd8cd42c3fa61076185fc.tar.gz
rust-df9640211d5ba4d2fbafd8cd42c3fa61076185fc.zip
Add a tvOS entry to the platform-support documentation
Diffstat (limited to 'src/doc/rustc')
-rw-r--r--src/doc/rustc/src/platform-support.md4
-rw-r--r--src/doc/rustc/src/platform-support/apple-tvos.md70
2 files changed, 72 insertions, 2 deletions
diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md
index f69dcd5983d..62f628f8229 100644
--- a/src/doc/rustc/src/platform-support.md
+++ b/src/doc/rustc/src/platform-support.md
@@ -214,7 +214,7 @@ host tools.
 target | std | host | notes
 -------|:---:|:----:|-------
 `aarch64-apple-ios-macabi` | ? |  | Apple Catalyst on ARM64
-`aarch64-apple-tvos` | * |  | ARM64 tvOS
+[`aarch64-apple-tvos`](platform-support/apple-tvos.md) | ? |  | ARM64 tvOS
 [`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
@@ -316,7 +316,7 @@ target | std | host | notes
 `thumbv7neon-unknown-linux-musleabihf` | ? |  | Thumb2-mode ARMv7a Linux with NEON, MUSL
 [`wasm64-unknown-unknown`](platform-support/wasm64-unknown-unknown.md) | ? |  | WebAssembly
 `x86_64-apple-ios-macabi` | ✓ |  | Apple Catalyst on x86_64
-`x86_64-apple-tvos` | * | | x86 64-bit tvOS
+[`x86_64-apple-tvos`](platform-support/apple-tvos.md) | ? | | x86 64-bit tvOS
 [`x86_64-apple-watchos-sim`](platform-support/apple-watchos.md) | ✓ | | x86 64-bit Apple WatchOS simulator
 [`x86_64-pc-nto-qnx710`](platform-support/nto-qnx.md) | ✓ |  | x86 64-bit QNX Neutrino 7.1 RTOS |
 [`x86_64-pc-windows-gnullvm`](platform-support/pc-windows-gnullvm.md) | ✓ | ✓ |
diff --git a/src/doc/rustc/src/platform-support/apple-tvos.md b/src/doc/rustc/src/platform-support/apple-tvos.md
new file mode 100644
index 00000000000..95256178cfd
--- /dev/null
+++ b/src/doc/rustc/src/platform-support/apple-tvos.md
@@ -0,0 +1,70 @@
+# `*-apple-tvos`
+- aarch64-apple-tvos
+- x86_64-apple-tvos
+
+**Tier: 3**
+
+Apple WatchOS targets:
+- Apple tvOS on aarch64
+- Apple tvOS Simulator on x86_64
+
+## Target maintainers
+
+* [@thomcc](https://github.com/thomcc)
+
+## Requirements
+
+These targets are cross-compiled. You will need appropriate versions of XCode
+and the SDKs for tvOS (`AppleTVOS.sdk`) and/or the tvOS Simulator
+(`AppleTVSimulator.sdk`) to build a toolchain and target these platforms.
+
+The targets support the full standard library including the allocator to the
+best of my knowledge, however they are very new, not yet well-tested tested, and
+it is possible that there are various bugs.
+
+In theory we support back to tvOS version 7.0, although the actual minimum
+version you can target may be newer than this, for example due to the versions
+of XCode and your SDKs.
+
+As with the other Apple targets, `rustc` respects the common environment
+variables used by XCode to configure this, in this case
+`TVOS_DEPLOYMENT_TARGET`.
+
+## Building the target
+
+The targets can be built by enabling them for a `rustc` build, for example:
+
+```toml
+[build]
+build-stage = 1
+target = ["aarch64-apple-tvos", "x86_64-apple-tvos"]
+```
+
+It's possible that cargo under `-Zbuild-std` may also be used to target them.
+
+## Building Rust programs
+
+*Note: Building for this target requires the corresponding TVOS SDK, as provided by Xcode.*
+
+Rust programs can be built for these targets
+
+```text
+$ rustc --target aarch64-apple-tvos your-code.rs
+...
+$ rustc --target x86_64-apple-tvos your-code.rs
+```
+
+## Testing
+
+There is no support for running the Rust or standard library testsuite on tvOS
+or the simulators at the moment. Testing has mostly been done manually with
+builds of static libraries called from XCode or a simulator.
+
+It hopefully will be possible to improve this in the future.
+
+## Cross-compilation toolchains and C code
+
+This target can be cross-compiled from x86_64 or aarch64 macOS hosts.
+
+Other hosts are not supported for cross-compilation, but might work when also
+providing the required Xcode SDK.