Skip to content

Commit 7888d0b

Browse files
authored
Rollup merge of rust-lang#133411 - RalfJung:emscripten-is-on-wasm, r=workingjubilee
the emscripten OS no longer exists on non-wasm targets rust-lang#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``
2 parents af93a3b + 6484420 commit 7888d0b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler/rustc_target/src/spec/tests/tests_impl.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ impl Target {
2121
if self.is_like_msvc {
2222
assert!(self.is_like_windows);
2323
}
24+
if self.os == "emscripten" {
25+
assert!(self.is_like_wasm);
26+
}
2427

2528
// Check that default linker flavor is compatible with some other key properties.
2629
assert_eq!(self.is_like_osx, matches!(self.linker_flavor, LinkerFlavor::Darwin(..)));
@@ -139,7 +142,7 @@ impl Target {
139142
assert!(self.dynamic_linking);
140143
}
141144
// Apparently PIC was slow on wasm at some point, see comments in wasm_base.rs
142-
if self.dynamic_linking && !(self.is_like_wasm && self.os != "emscripten") {
145+
if self.dynamic_linking && !self.is_like_wasm {
143146
assert_eq!(self.relocation_model, RelocModel::Pic);
144147
}
145148
if self.position_independent_executables {

0 commit comments

Comments
 (0)