Skip to content

Commit 7d9690a

Browse files
committed
Remove old support for emscripten/wasm32-u-u
This commit removes the `wasm32-shim.js` file, for example, and deletes old support for Emscripten which hasn't been exercised in some time.
1 parent 8fcc009 commit 7d9690a

File tree

3 files changed

+4
-65
lines changed

3 files changed

+4
-65
lines changed

src/bootstrap/src/core/build_steps/test.rs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1657,8 +1657,8 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
16571657
// ensure that `libproc_macro` is available on the host.
16581658
builder.ensure(compile::Std::new(compiler, compiler.host));
16591659

1660-
// As well as the target, except for plain wasm32, which can't build it
1661-
if suite != "mir-opt" && !target.contains("wasm") && !target.contains("emscripten") {
1660+
// As well as the target
1661+
if suite != "mir-opt" {
16621662
builder.ensure(TestHelpers { target });
16631663
}
16641664

@@ -2511,16 +2511,7 @@ fn prepare_cargo_test(
25112511
dylib_path.insert(0, PathBuf::from(&*builder.sysroot_libdir(compiler, target)));
25122512
cargo.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
25132513

2514-
if target.contains("emscripten") {
2515-
cargo.env(
2516-
format!("CARGO_TARGET_{}_RUNNER", envify(&target.triple)),
2517-
builder.config.nodejs.as_ref().expect("nodejs not configured"),
2518-
);
2519-
} else if target.starts_with("wasm32") {
2520-
let node = builder.config.nodejs.as_ref().expect("nodejs not configured");
2521-
let runner = format!("{} {}/src/etc/wasm32-shim.js", node.display(), builder.src.display());
2522-
cargo.env(format!("CARGO_TARGET_{}_RUNNER", envify(&target.triple)), &runner);
2523-
} else if builder.remote_tested(target) {
2514+
if builder.remote_tested(target) {
25242515
cargo.env(
25252516
format!("CARGO_TARGET_{}_RUNNER", envify(&target.triple)),
25262517
format!("{} run 0", builder.tool_exe(Tool::RemoteTestClient).display()),

src/etc/wasm32-shim.js

Lines changed: 0 additions & 24 deletions
This file was deleted.

src/tools/compiletest/src/runtest.rs

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2632,9 +2632,7 @@ impl<'test> TestCx<'test> {
26322632
// double the length.
26332633
let mut f = self.output_base_dir().join("a");
26342634
// FIXME: This is using the host architecture exe suffix, not target!
2635-
if self.config.target.contains("emscripten") {
2636-
f = f.with_extra_extension("js");
2637-
} else if self.config.target.contains("wasm32") {
2635+
if self.config.target.starts_with("wasm") {
26382636
f = f.with_extra_extension("wasm");
26392637
} else if self.config.target.contains("spirv") {
26402638
f = f.with_extra_extension("spv");
@@ -2649,32 +2647,6 @@ impl<'test> TestCx<'test> {
26492647
// then split apart its command
26502648
let mut args = self.split_maybe_args(&self.config.runner);
26512649

2652-
// If this is emscripten, then run tests under nodejs
2653-
if self.config.target.contains("emscripten") {
2654-
if let Some(ref p) = self.config.nodejs {
2655-
args.push(p.into());
2656-
} else {
2657-
self.fatal("emscripten target requested and no NodeJS binary found (--nodejs)");
2658-
}
2659-
// If this is otherwise wasm, then run tests under nodejs with our
2660-
// shim
2661-
} else if self.config.target.contains("wasm32") {
2662-
if let Some(ref p) = self.config.nodejs {
2663-
args.push(p.into());
2664-
} else {
2665-
self.fatal("wasm32 target requested and no NodeJS binary found (--nodejs)");
2666-
}
2667-
2668-
let src = self
2669-
.config
2670-
.src_base
2671-
.parent()
2672-
.unwrap() // chop off `ui`
2673-
.parent()
2674-
.unwrap(); // chop off `tests`
2675-
args.push(src.join("src/etc/wasm32-shim.js").into_os_string());
2676-
}
2677-
26782650
let exe_file = self.make_exe_name();
26792651

26802652
args.push(exe_file.into_os_string());

0 commit comments

Comments
 (0)