diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs index e308801b2548f..31b31ecb89c46 100644 --- a/src/bootstrap/src/core/build_steps/test.rs +++ b/src/bootstrap/src/core/build_steps/test.rs @@ -1102,6 +1102,14 @@ impl CommandLineStep for IntrinsicTest { builder.info(&format!("Skipping intrinsic-test, as it is not available for {host}")); return; } + // intrinsic-test shells out to `cargo` and `rustfmt` make bootstrap's + // managed binaries findable by prepending their dirs to PATH. + let Some(rustfmt_path) = builder.ensure(InternalRustfmt) else { + eprintln!( + "WARNING: intrinsic-test skipped because rustfmt is required but not available on this channel" + ); + return; + }; let (input_file, skip_file, cflags, sde_runner) = if host.contains("x86_64-unknown-linux") { let Some(sde) = &builder.config.sde else { @@ -1172,14 +1180,6 @@ impl CommandLineStep for IntrinsicTest { cmd.arg("--cc-arg-style").arg("gcc"); cmd.env("CC", builder.cc(host)); cmd.env("CFLAGS", cflags); - // intrinsic-test shells out to `cargo` and `rustfmt` make bootstrap's - // managed binaries findable by prepending their dirs to PATH. - let Some(rustfmt_path) = builder.ensure(InternalRustfmt) else { - eprintln!( - "WARNING: intrinsic-test skipped because rustfmt is required but not available on this channel" - ); - return; - }; let mut path_dirs: Vec = Vec::new(); if let Some(cargo_dir) = builder.initial_cargo.parent() {