From 42aa0753109c44bea94f68802d3970d700f4ae13 Mon Sep 17 00:00:00 2001 From: David Koloski Date: Mon, 9 Jan 2023 10:22:08 -0500 Subject: [PATCH 1/2] Accept old spelling of Fuchsia target triples Because the old spelling is widely used, some projects may need time to migrate their uses to the new triple spelling. The old spelling may eventually be removed altogether. --- compiler/rustc_target/src/spec/aarch64_fuchsia.rs | 1 + compiler/rustc_target/src/spec/mod.rs | 6 +++++- compiler/rustc_target/src/spec/x86_64_fuchsia.rs | 1 + src/doc/rustc/src/platform-support.md | 2 ++ 4 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 compiler/rustc_target/src/spec/aarch64_fuchsia.rs create mode 100644 compiler/rustc_target/src/spec/x86_64_fuchsia.rs diff --git a/compiler/rustc_target/src/spec/aarch64_fuchsia.rs b/compiler/rustc_target/src/spec/aarch64_fuchsia.rs new file mode 100644 index 0000000000000..ddecbb1a8c4a4 --- /dev/null +++ b/compiler/rustc_target/src/spec/aarch64_fuchsia.rs @@ -0,0 +1 @@ +pub use crate::spec::aarch64_unknown_fuchsia::target; diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index dd56037a272c2..d4543bce3496e 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -981,7 +981,7 @@ impl fmt::Display for StackProtector { } macro_rules! supported_targets { - ( $(($triple:literal, $module:ident ),)+ ) => { + ( $(($triple:literal, $module:ident),)+ ) => { $(mod $module;)+ /// List of supported targets @@ -1109,7 +1109,11 @@ supported_targets! { ("x86_64-apple-darwin", x86_64_apple_darwin), ("i686-apple-darwin", i686_apple_darwin), + // FIXME(fuchsia): Remove aarch64-fuchsia in favor of aarch64-unknown-fuchsia + ("aarch64-fuchsia", aarch64_fuchsia), ("aarch64-unknown-fuchsia", aarch64_unknown_fuchsia), + // FIXME(fuchsia): Remove x86_64-fuchsia in favor of x86_64-unknown-fuchsia + ("x86_64-fuchsia", x86_64_fuchsia), ("x86_64-unknown-fuchsia", x86_64_unknown_fuchsia), ("avr-unknown-gnu-atmega328", avr_unknown_gnu_atmega328), diff --git a/compiler/rustc_target/src/spec/x86_64_fuchsia.rs b/compiler/rustc_target/src/spec/x86_64_fuchsia.rs new file mode 100644 index 0000000000000..96fed09756667 --- /dev/null +++ b/compiler/rustc_target/src/spec/x86_64_fuchsia.rs @@ -0,0 +1 @@ +pub use crate::spec::x86_64_unknown_fuchsia::target; diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md index 7ff26e420f1b3..16057048259bf 100644 --- a/src/doc/rustc/src/platform-support.md +++ b/src/doc/rustc/src/platform-support.md @@ -124,6 +124,7 @@ target | std | notes -------|:---:|------- `aarch64-apple-ios` | ✓ | ARM64 iOS [`aarch64-apple-ios-sim`](platform-support/aarch64-apple-ios-sim.md) | ✓ | Apple iOS Simulator on ARM64 +`aarch64-fuchsia` | ✓ | Alias for `aarch64-unknown-fuchsia` `aarch64-unknown-fuchsia` | ✓ | ARM64 Fuchsia [`aarch64-linux-android`](platform-support/android.md) | ✓ | ARM64 Android `aarch64-unknown-none-softfloat` | * | Bare ARM64, softfloat @@ -177,6 +178,7 @@ target | std | notes `wasm32-wasi` | ✓ | WebAssembly with WASI `x86_64-apple-ios` | ✓ | 64-bit x86 iOS [`x86_64-fortanix-unknown-sgx`](platform-support/x86_64-fortanix-unknown-sgx.md) | ✓ | [Fortanix ABI] for 64-bit Intel SGX +`x86_64-fuchsia` | ✓ | Alias for `x86_64-unknown-fuchsia` `x86_64-unknown-fuchsia` | ✓ | 64-bit Fuchsia [`x86_64-linux-android`](platform-support/android.md) | ✓ | 64-bit x86 Android `x86_64-pc-solaris` | ✓ | 64-bit Solaris 10/11, illumos From 9c23629158d863068f51a7f316dbe15a76d7e602 Mon Sep 17 00:00:00 2001 From: Tyler Mandry Date: Mon, 9 Jan 2023 13:23:50 -0500 Subject: [PATCH 2/2] Add issue number to FIXMEs --- compiler/rustc_target/src/spec/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index d4543bce3496e..2c3aa67201138 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -1109,10 +1109,10 @@ supported_targets! { ("x86_64-apple-darwin", x86_64_apple_darwin), ("i686-apple-darwin", i686_apple_darwin), - // FIXME(fuchsia): Remove aarch64-fuchsia in favor of aarch64-unknown-fuchsia + // FIXME(#106649): Remove aarch64-fuchsia in favor of aarch64-unknown-fuchsia ("aarch64-fuchsia", aarch64_fuchsia), ("aarch64-unknown-fuchsia", aarch64_unknown_fuchsia), - // FIXME(fuchsia): Remove x86_64-fuchsia in favor of x86_64-unknown-fuchsia + // FIXME(#106649): Remove x86_64-fuchsia in favor of x86_64-unknown-fuchsia ("x86_64-fuchsia", x86_64_fuchsia), ("x86_64-unknown-fuchsia", x86_64_unknown_fuchsia),