Skip to content

Commit

Permalink
Rollup merge of rust-lang#122795 - alexcrichton:fix-wasm-beta-bootstr…
Browse files Browse the repository at this point in the history
…ap, r=Mark-Simulacrum

Inherit `RUSTC_BOOTSTRAP` when testing wasm

This is implemented with the freshly-released Wasmtime 19 and should prevent beta breakage from wasm tests that was observed and fixed in rust-lang#122640 again.
  • Loading branch information
matthiaskrgr committed Mar 21, 2024
2 parents 01c5e74 + a400dac commit e94cd88
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/bootstrap/src/lib.rs
Expand Up @@ -1389,6 +1389,13 @@ impl Build {
if let Some(path) = finder.maybe_have("wasmtime") {
if let Ok(mut path) = path.into_os_string().into_string() {
path.push_str(" run -C cache=n --dir .");
// Make sure that tests have access to RUSTC_BOOTSTRAP. This (for example) is
// required for libtest to work on beta/stable channels.
//
// NB: with Wasmtime 20 this can change to `-S inherit-env` to
// inherit the entire environment rather than just this single
// environment variable.
path.push_str(" --env RUSTC_BOOTSTRAP");
return Some(path);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/ci/docker/host-x86_64/test-various/Dockerfile
Expand Up @@ -55,9 +55,9 @@ ENV RUST_CONFIGURE_ARGS \
ENV NO_DEBUG_ASSERTIONS=1
ENV NO_OVERFLOW_CHECKS=1

RUN curl -L https://github.com/bytecodealliance/wasmtime/releases/download/v18.0.2/wasmtime-v18.0.2-x86_64-linux.tar.xz | \
RUN curl -L https://github.com/bytecodealliance/wasmtime/releases/download/v19.0.0/wasmtime-v19.0.0-x86_64-linux.tar.xz | \
tar -xJ
ENV PATH "$PATH:/wasmtime-v18.0.2-x86_64-linux"
ENV PATH "$PATH:/wasmtime-v19.0.0-x86_64-linux"

ENV WASM_TARGETS=wasm32-wasip1
ENV WASM_SCRIPT python3 /checkout/x.py --stage 2 test --host='' --target $WASM_TARGETS \
Expand Down

0 comments on commit e94cd88

Please sign in to comment.