diff options
| author | Hood Chatham <roberthoodchatham@gmail.com> | 2024-10-14 21:16:27 +0200 |
|---|---|---|
| committer | Hood Chatham <roberthoodchatham@gmail.com> | 2024-10-15 14:25:55 +0200 |
| commit | 1d6643c4f69ba31f91a385c51f46d615bd2b0d66 (patch) | |
| tree | 4900a95f4d22d6d3e650143e745402b6cb6d6ad0 /src/bootstrap | |
| parent | 17a19e684cdf3ca088af8b4da6a6209d128913f4 (diff) | |
| download | rust-1d6643c4f69ba31f91a385c51f46d615bd2b0d66.tar.gz rust-1d6643c4f69ba31f91a385c51f46d615bd2b0d66.zip | |
Fix most ui tests on emscripten target
To fix the linker errors, we need to set the output extension to `.js` instead of `.wasm`. Setting the output to a `.wasm` file puts Emscripten into standalone mode which is effectively a distinct target. We need to set the runner to be `node` as well. This fixes most of the ui tests. I fixed a few more tests with simple problems: - `intrinsics/intrinsic-alignment.rs` and `structs-enums/rec-align-u64.rs` -- Two `#[cfg]` macros match for Emscripten so we got a duplicate definition of `mod m`. - `issues/issue-12699.rs` -- Seems to hang so I disabled it - `process/process-sigpipe.rs` -- Not expected to work on Emscripten so I disabled it
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/src/core/config/config.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs index f768470c4ff..eb571f920df 100644 --- a/src/bootstrap/src/core/config/config.rs +++ b/src/bootstrap/src/core/config/config.rs @@ -612,6 +612,9 @@ impl Target { if triple.contains("-none") || triple.contains("nvptx") || triple.contains("switch") { target.no_std = true; } + if triple.contains("emscripten") { + target.runner = Some("node".into()); + } target } } |
