From ae859c3f7be2fe63ebb96dc5cba3c635b81da65b Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 16 Sep 2020 19:54:52 +0200 Subject: [PATCH] add comment mentioning alternative approach --- cargo-miri/bin.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cargo-miri/bin.rs b/cargo-miri/bin.rs index 871478d330c..522570626d0 100644 --- a/cargo-miri/bin.rs +++ b/cargo-miri/bin.rs @@ -397,6 +397,11 @@ fn phase_cargo_miri(mut args: env::Args) { setup(subcommand); // Invoke actual cargo for the job, but with different flags. + // We re-use `cargo test` and `cargo run`, which makes target and binary handling very easy but + // requires some extra work to make the build check-only (see all the `--emit` hacks below). + // describes an alternative + // approach that uses `cargo check`, making that part easier but target and binary handling + // harder. let miri_path = std::env::current_exe().expect("current executable path invalid"); let cargo_cmd = match subcommand { MiriCommand::Test => "test",