about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-11-26 15:32:12 +0100
committerGitHub <noreply@github.com>2024-11-26 15:32:12 +0100
commit620cdfc6dc15008318f8c724511eef7049f93d01 (patch)
treeca93db3017a1a52c90b61fd8e38011a1ad86eeb3
parentf2abf827c128120ed7a874d02973947968c158b8 (diff)
parent6484420e5de69f53c1e48eb19da78f2ebbd56093 (diff)
downloadrust-620cdfc6dc15008318f8c724511eef7049f93d01.tar.gz
rust-620cdfc6dc15008318f8c724511eef7049f93d01.zip
Rollup merge of #133411 - RalfJung:emscripten-is-on-wasm, r=workingjubilee
the emscripten OS no longer exists on non-wasm targets

https://github.com/rust-lang/rust/pull/117338 removed our asmjs targets, which AFAIK means that emscripten only exists on wasm targets. However at least one place in the code still checked "is wasm or is emscripten". Let's fix that.

Cc ```@workingjubilee```
-rw-r--r--compiler/rustc_target/src/spec/tests/tests_impl.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/rustc_target/src/spec/tests/tests_impl.rs b/compiler/rustc_target/src/spec/tests/tests_impl.rs
index bd47d12ef9f..522b9f837d7 100644
--- a/compiler/rustc_target/src/spec/tests/tests_impl.rs
+++ b/compiler/rustc_target/src/spec/tests/tests_impl.rs
@@ -19,6 +19,9 @@ impl Target {
         if self.is_like_msvc {
             assert!(self.is_like_windows);
         }
+        if self.os == "emscripten" {
+            assert!(self.is_like_wasm);
+        }
 
         // Check that default linker flavor is compatible with some other key properties.
         assert_eq!(self.is_like_osx, matches!(self.linker_flavor, LinkerFlavor::Darwin(..)));
@@ -137,7 +140,7 @@ impl Target {
             assert!(self.dynamic_linking);
         }
         // Apparently PIC was slow on wasm at some point, see comments in wasm_base.rs
-        if self.dynamic_linking && !(self.is_like_wasm && self.os != "emscripten") {
+        if self.dynamic_linking && !self.is_like_wasm {
             assert_eq!(self.relocation_model, RelocModel::Pic);
         }
         if self.position_independent_executables {