Skip to content

Commit ccc302b

Browse files
committed
Move --compile-time-deps
1 parent ae1075b commit ccc302b

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/bootstrap/src/core/build_steps/compile.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2542,11 +2542,6 @@ pub fn stream_cargo(
25422542
}
25432543
cmd.arg("--message-format").arg(message_format);
25442544

2545-
if builder.config.compile_time_deps {
2546-
cmd.arg("-Zunstable-options");
2547-
cmd.arg("--compile-time-deps");
2548-
}
2549-
25502545
for arg in tail_args {
25512546
cmd.arg(arg);
25522547
}

src/bootstrap/src/core/builder/cargo.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,12 @@ impl Builder<'_> {
747747
// Make cargo emit diagnostics relative to the rustc src dir.
748748
cargo.arg(format!("-Zroot-dir={}", self.src.display()));
749749

750+
if self.config.compile_time_deps {
751+
// Build only build scripts and proc-macros for rust-analyzer when requested.
752+
cargo.arg("-Zunstable-options");
753+
cargo.arg("--compile-time-deps");
754+
}
755+
750756
// FIXME: Temporary fix for https://github.com/rust-lang/cargo/issues/3005
751757
// Force cargo to output binaries with disambiguating hashes in the name
752758
let mut metadata = if compiler.stage == 0 {

0 commit comments

Comments
 (0)