Skip to content

Commit

Permalink
Rename aarch64-nintendo-switch to aarch64-nintendo-switch-freestanding
Browse files Browse the repository at this point in the history
  • Loading branch information
leo60228 committed Jul 14, 2022
1 parent d04753e commit 62aafb0
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::{LinkerFlavor, LldFlavor, PanicStrategy, RelroLevel, Target, TargetOptions};

const LINKER_SCRIPT: &str = include_str!("./aarch64_nintendo_switch_linker_script.ld");
const LINKER_SCRIPT: &str = include_str!("./aarch64_nintendo_switch_freestanding_linker_script.ld");

/// A base target for Nintendo Switch devices using a pure LLVM toolchain.
pub fn target() -> Target {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_target/src/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ supported_targets! {

("armv6k-nintendo-3ds", armv6k_nintendo_3ds),

("aarch64-nintendo-switch", aarch64_nintendo_switch),
("aarch64-nintendo-switch-freestanding", aarch64_nintendo_switch_freestanding),

("armv7-unknown-linux-uclibceabi", armv7_unknown_linux_uclibceabi),
("armv7-unknown-linux-uclibceabihf", armv7_unknown_linux_uclibceabihf),
Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustc/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
- [Template for Target-specific Documentation](platform-support/TEMPLATE.md)
- [aarch64-apple-ios-sim](platform-support/aarch64-apple-ios-sim.md)
- [\*-apple-watchos\*](platform-support/apple-watchos.md)
- [aarch64-nintendo-switch](platform-support/aarch64-nintendo-switch.md)
- [aarch64-nintendo-switch-freestanding](platform-support/aarch64-nintendo-switch-freestanding.md)
- [armv6k-nintendo-3ds](platform-support/armv6k-nintendo-3ds.md)
- [armv7-unknown-linux-uclibceabi](platform-support/armv7-unknown-linux-uclibceabi.md)
- [armv7-unknown-linux-uclibceabihf](platform-support/armv7-unknown-linux-uclibceabihf.md)
Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustc/src/platform-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ target | std | host | notes
`aarch64-apple-tvos` | * | | 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`](platform-support/aarch64-nintendo-switch.md) | * | | ARM64 Nintendo Switch, Horizon
[`aarch64-nintendo-switch-freestanding`](platform-support/aarch64-nintendo-switch-freestanding.md) | * | | ARM64 Nintendo Switch, Horizon
[`aarch64-pc-windows-gnullvm`](platform-support/pc-windows-gnullvm.md) | ✓ | ✓ |
`aarch64-unknown-freebsd` | ✓ | ✓ | ARM64 FreeBSD
`aarch64-unknown-hermit` | ✓ | | ARM64 HermitCore
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# aarch64-nintendo-switch
# aarch64-nintendo-switch-freestanding

**Tier: 3**

Expand All @@ -21,7 +21,7 @@ The target can be built by enabling it for a `rustc` build:
```toml
[build]
build-stage = 1
target = ["aarch64-nintendo-switch"]
target = ["aarch64-nintendo-switch-freestanding"]
```

## Cross-compilation
Expand All @@ -38,12 +38,12 @@ If `rustc` has support for that target and the library artifacts are available,
then Rust programs can be built for that target:

```text
rustc --target aarch64-nintendo-switch your-code.rs
rustc --target aarch64-nintendo-switch-freestanding your-code.rs
```

To generate binaries in the NRO format that can be easily run on-device, you
can use [cargo-nx](https://github.com/aarch64-switch-rs/cargo-nx):

```text
cargo nx --triple=aarch64-nintendo-switch
cargo nx --triple=aarch64-nintendo-switch-freestanding
```

0 comments on commit 62aafb0

Please sign in to comment.