Skip to content

Commit 6bbd68a

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 4fe10c3 + 6484420 commit 6bbd68a

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

+4-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ impl Target {
1919
if self.is_like_msvc {
2020
assert!(self.is_like_windows);
2121
}
22+
if self.os == "emscripten" {
23+
assert!(self.is_like_wasm);
24+
}
2225

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

0 commit comments

Comments
 (0)