Change:
Perhaps I'm holding it wrong? About a fifth of the rustc UI test suite to fail on wasm32-unknown-emscripten when trying to run . In all cases we get an error like this:
Does this target use some different main symbol name?
... do we need to pass --no-entry to lib builds? can you check if (some of) the failing tests are lib crates? Actually what am I doing, I can check
I can't get past the building test helpers for this target cross-compiling from msvc host, not sure what's up with that.
Huh. cc Can you make it any further?
Because there's an open PR for this.
In the open platform support docs PR this says It's recommended to test the  target instead for WebAssembly compatibility. ... so I don't know, is this expected failure?
See I was able to get past the build helpers stage by properly acquring the toolchain and making relevant env vars available to bootstrap. Didn't bother trying to diagnose past stage 1 std and tests because there's like a chain of failures. Notably I see
The failing link command includes: if we replace that with , then it links as expected. But then it fails to run it at: We should invoke with node.
So I guess for starters we should do:
Combined with setting the runner to this fixes most of the failing tests:
The failures seem to be: and seems like it hangs? sounds like an xfail.

Discussion:
if triple.contains("-none") || triple.contains("nvptx") || triple.contains("switch") { target.no_std = true; } <ins> if triple.contains("emscripten") { target.runner = Some("node".into()); } </ins> target } }

// double the length. let mut f = self.output_base_dir().join("a"); // FIXME: This is using the host architecture exe suffix, not target! <del> if self.config.target.starts_with("wasm") { </del> <ins> if self.config.target.contains("emscripten") { f = f.with_extra_extension("js"); } else if self.config.target.starts_with("wasm") { </ins> f = f.with_extra_extension("wasm"); } else if self.config.target.contains("spirv") { f = f.with_extra_extension("spv");

ui/issues/issue-12612.rs ui/issues/issue-12660.rs ui/issues/issue-12677.rs <del> ui/issues/issue-12699.rs </del> ui/issues/issue-12729.rs ui/issues/issue-12744.rs ui/issues/issue-12860.rs

const ENTRY_LIMIT: u32 = 901; // FIXME: The following limits should be reduced eventually. <del> const ISSUES_ENTRY_LIMIT: u32 = 1673; </del> <ins> const ISSUES_ENTRY_LIMIT: u32 = 1672; </ins> const EXPECTED_TEST_FILE_EXTENSIONS: &[&str] = &[ "rs",     // test source files

<del> //@ run-pass //@ ignore-sgx not supported #![allow(deprecated)] use std::thread; fn main() { thread::sleep_ms(250); } </del>

//@ ignore-vxworks no 'sh' //@ ignore-fuchsia no 'sh' <ins> //@ ignore-emscripten No threads //@ only-unix SIGPIPE is a unix feature </ins> use std::process; use std::thread; <del> #[cfg(unix)] </del> fn main() { // Just in case `yes` doesn't check for EPIPE... thread::spawn(|| {

assert!(output.status.success()); assert!(output.stderr.len() == 0); } <del> #[cfg(not(unix))] fn main() { // Not worried about signal masks on other platforms } </del>

<ins> //@ run-pass //@ ignore-sgx not supported //@ ignore-emscripten // FIXME: test hangs on emscripten #![allow(deprecated)] #![allow(unused_imports)] use std::thread; fn main() { thread::sleep_ms(250); } </ins>

#[cfg(any( target_os = "android", target_os = "dragonfly", <del> target_os = "emscripten", </del> target_os = "freebsd", target_os = "fuchsia", target_os = "hurd",