Skip to content
/ rust Public
forked from rust-lang/rust

Commit

Permalink
Rollup merge of rust-lang#133411 - RalfJung:emscripten-is-on-wasm, r=…
Browse files Browse the repository at this point in the history
…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``
  • Loading branch information
jhpratt authored Nov 26, 2024
2 parents af93a3b + 6484420 commit 7888d0b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion compiler/rustc_target/src/spec/tests/tests_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(..)));
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 7888d0b

Please sign in to comment.