diff --git a/compiler/rustc_target/src/spec/tests/tests_impl.rs b/compiler/rustc_target/src/spec/tests/tests_impl.rs index b0d3befae8376..3225cdc759d98 100644 --- a/compiler/rustc_target/src/spec/tests/tests_impl.rs +++ b/compiler/rustc_target/src/spec/tests/tests_impl.rs @@ -21,6 +21,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(..))); @@ -139,7 +142,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 {