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 #122640 again.
This commit is contained in:
Alex Crichton 2024-03-20 14:41:02 -07:00
parent e3df96cfda
commit a400dac8ca
2 changed files with 9 additions and 2 deletions

View file

@ -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);
}
}