Move --compile-time-deps

This commit is contained in:
bjorn3 2025-07-12 12:33:55 +00:00
parent ae1075b9ee
commit ccc302baa0
2 changed files with 6 additions and 5 deletions

View file

@ -2542,11 +2542,6 @@ pub fn stream_cargo(
}
cmd.arg("--message-format").arg(message_format);
if builder.config.compile_time_deps {
cmd.arg("-Zunstable-options");
cmd.arg("--compile-time-deps");
}
for arg in tail_args {
cmd.arg(arg);
}

View file

@ -747,6 +747,12 @@ impl Builder<'_> {
// Make cargo emit diagnostics relative to the rustc src dir.
cargo.arg(format!("-Zroot-dir={}", self.src.display()));
if self.config.compile_time_deps {
// Build only build scripts and proc-macros for rust-analyzer when requested.
cargo.arg("-Zunstable-options");
cargo.arg("--compile-time-deps");
}
// FIXME: Temporary fix for https://github.com/rust-lang/cargo/issues/3005
// Force cargo to output binaries with disambiguating hashes in the name
let mut metadata = if compiler.stage == 0 {