about summary refs log tree commit diff
path: root/compiler/rustc_target/src
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2024-11-03 07:04:02 -0800
committerAlex Crichton <alex@alexcrichton.com>2024-11-03 07:09:34 -0800
commitc049cc17f3fdffe5502c4c94ab0c535aa910eb72 (patch)
tree4b2bcce34af0c9e716c99fd291979271f8a33f53 /compiler/rustc_target/src
parent59ae5eba7e74d2cc7d8d611662e8b3a642d7093a (diff)
downloadrust-c049cc17f3fdffe5502c4c94ab0c535aa910eb72.tar.gz
rust-c049cc17f3fdffe5502c4c94ab0c535aa910eb72.zip
Remove the `wasm32-wasi` target from rustc
This commit is the final step in the journey of renaming the historical
`wasm32-wasi` target in the Rust compiler to `wasm32-wasip1`. Various
steps in this journey so far have been:

* 2023-04-03: rust-lang/compiler-team#607 - initial proposal for this rename
* 2024-11-27: rust-lang/compiler-team#695 - amended schedule/procedure for rename
* 2024-01-29: rust-lang/rust#120468 - initial introduction of `wasm32-wasip1`
* 2024-06-18: rust-lang/rust#126662 - warn on usage of `wasm32-wasi`
* 2024-11-08: this PR - remove the `wasm32-wasi` target

The full transition schedule is in [this comment][comment] and is
summarized with:

* 2024-05-02: Rust 1.78 released with `wasm32-wasip1` target
* 2024-09-05: Rust 1.81 released warning on usage of `wasm32-wasi`
* 2025-01-09: Rust 1.84 to be released without the `wasm32-wasi` target

This means that support on stable for the replacement target of
`wasm32-wasip1` has currently been available for 6 months. Users have
already seen warnings on stable for 2 months about usage of
`wasm32-wasi` and stable users have another 2 months of warnings before
the target is removed from stable.

This commit is intended to be the final step in this transition so the
source tree should no longer mention `wasm32-wasi` except in historical
reference to the older name of the `wasm32-wasip1` target.

[comment]: https://github.com/rust-lang/rust/pull/120468#issuecomment-1977878747
Diffstat (limited to 'compiler/rustc_target/src')
-rw-r--r--compiler/rustc_target/src/spec/mod.rs1
-rw-r--r--compiler/rustc_target/src/spec/targets/wasm32_wasi.rs11
-rw-r--r--compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs4
-rw-r--r--compiler/rustc_target/src/spec/targets/wasm32_wasip2.rs2
4 files changed, 3 insertions, 15 deletions
diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
index 06408e0b210..c9f86e575a7 100644
--- a/compiler/rustc_target/src/spec/mod.rs
+++ b/compiler/rustc_target/src/spec/mod.rs
@@ -1806,7 +1806,6 @@ supported_targets! {
     ("wasm32-unknown-emscripten", wasm32_unknown_emscripten),
     ("wasm32-unknown-unknown", wasm32_unknown_unknown),
     ("wasm32v1-none", wasm32v1_none),
-    ("wasm32-wasi", wasm32_wasi),
     ("wasm32-wasip1", wasm32_wasip1),
     ("wasm32-wasip2", wasm32_wasip2),
     ("wasm32-wasip1-threads", wasm32_wasip1_threads),
diff --git a/compiler/rustc_target/src/spec/targets/wasm32_wasi.rs b/compiler/rustc_target/src/spec/targets/wasm32_wasi.rs
deleted file mode 100644
index c317ebd9592..00000000000
--- a/compiler/rustc_target/src/spec/targets/wasm32_wasi.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-//! NB: This target is in the process of being renamed to
-//! `wasm32-wasip1`. For more information see:
-//!
-//! * <https://github.com/rust-lang/compiler-team/issues/607>
-//! * <https://github.com/rust-lang/compiler-team/issues/695>
-
-use crate::spec::Target;
-
-pub(crate) fn target() -> Target {
-    super::wasm32_wasip1::target()
-}
diff --git a/compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs b/compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs
index 89d0721bf35..1cd30f21bec 100644
--- a/compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs
+++ b/compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs
@@ -17,7 +17,7 @@ pub(crate) fn target() -> Target {
 
     options.os = "wasi".into();
     options.env = "p1".into();
-    options.add_pre_link_args(LinkerFlavor::WasmLld(Cc::Yes), &["--target=wasm32-wasi"]);
+    options.add_pre_link_args(LinkerFlavor::WasmLld(Cc::Yes), &["--target=wasm32-wasip1"]);
 
     options.pre_link_objects_self_contained = crt_objects::pre_wasi_self_contained();
     options.post_link_objects_self_contained = crt_objects::post_wasi_self_contained();
@@ -47,7 +47,7 @@ pub(crate) fn target() -> Target {
     options.entry_name = "__main_void".into();
 
     Target {
-        llvm_target: "wasm32-wasi".into(),
+        llvm_target: "wasm32-wasip1".into(),
         metadata: crate::spec::TargetMetadata {
             description: Some("WebAssembly with WASI".into()),
             tier: Some(2),
diff --git a/compiler/rustc_target/src/spec/targets/wasm32_wasip2.rs b/compiler/rustc_target/src/spec/targets/wasm32_wasip2.rs
index bd6bba067ef..f06112160d1 100644
--- a/compiler/rustc_target/src/spec/targets/wasm32_wasip2.rs
+++ b/compiler/rustc_target/src/spec/targets/wasm32_wasip2.rs
@@ -1,5 +1,5 @@
 //! The `wasm32-wasip2` target is the next evolution of the
-//! wasm32-wasi target. While the wasi specification is still under
+//! wasm32-wasip1 target. While the wasi specification is still under
 //! active development, the preview 2 iteration is considered an "island
 //! of stability" that should allow users to rely on it indefinitely.
 //!