Skip to content

Commit ac81765

Browse files
committed
Skip our miri-playground wrapper script
We don't really need it anymore now that we can control environment variables from outside the container. This also opens us up to calling `cargo miri test` in addition to the currently hardcoded `cargo miri run`.
1 parent af1e430 commit ac81765

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

compiler/base/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ RUN rm src/*.rs
111111
COPY --from=build-orchestrator /playground/.cargo/bin/worker /playground/.cargo/bin/worker
112112
COPY --from=wasm-tools /playground/.cargo/bin/wasm-tools /playground/.cargo/bin
113113
COPY --chown=playground cargo-wasm /playground/.cargo/bin
114+
# `cargo-miri-playground` is vestigial and can be removed after a while
114115
COPY --chown=playground cargo-miri-playground /playground/.cargo/bin
115116

116117
ENTRYPOINT ["/playground/tools/entrypoint.sh"]

compiler/base/orchestrator/src/coordinator.rs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -688,12 +688,23 @@ impl LowerRequest for MiriRequest {
688688
miriflags.push("-Zmiri-tree-borrows");
689689
}
690690

691+
miriflags.push("-Zmiri-disable-isolation");
692+
691693
let miriflags = miriflags.join(" ");
692694

693695
ExecuteCommandRequest {
694696
cmd: "cargo".to_owned(),
695-
args: vec!["miri-playground".to_owned()],
696-
envs: kvs!("MIRIFLAGS" => miriflags).collect(),
697+
args: ["miri", "run"].map(Into::into).into(),
698+
envs: kvs! {
699+
"MIRIFLAGS" => miriflags,
700+
// Be sure that `cargo miri` will not build a new
701+
// sysroot. Creating a sysroot takes a while and Miri
702+
// will build one by default if it's missing. If
703+
// `MIRI_SYSROOT` is set and the sysroot is missing,
704+
// it will error instead.
705+
"MIRI_SYSROOT" => "/playground/.cache/miri",
706+
}
707+
.collect(),
697708
cwd: None,
698709
}
699710
}
@@ -3971,8 +3982,7 @@ mod tests {
39713982
#[tokio::test]
39723983
#[snafu::report]
39733984
async fn miri() -> Result<()> {
3974-
// cargo-miri-playground only exists inside the container
3975-
let coordinator = new_coordinator_docker();
3985+
let coordinator = new_coordinator();
39763986

39773987
let req = MiriRequest {
39783988
code: r#"

0 commit comments

Comments
 (0)