diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-07-12 12:33:55 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-07-12 12:34:37 +0000 |
| commit | ccc302baa0478d02d950dd2c7455a5ea19136e66 (patch) | |
| tree | 7e19c0b64d2ac0cd1b495802bd15f92f58dacd5c | |
| parent | ae1075b9eeffade3064809adb02ad5bafc13fd46 (diff) | |
| download | rust-ccc302baa0478d02d950dd2c7455a5ea19136e66.tar.gz rust-ccc302baa0478d02d950dd2c7455a5ea19136e66.zip | |
Move --compile-time-deps
| -rw-r--r-- | src/bootstrap/src/core/build_steps/compile.rs | 5 | ||||
| -rw-r--r-- | src/bootstrap/src/core/builder/cargo.rs | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs index 6fb7b7e71e9..1282a89a5e4 100644 --- a/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs @@ -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); } diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs index 065d7e45e0f..d5a290d804c 100644 --- a/src/bootstrap/src/core/builder/cargo.rs +++ b/src/bootstrap/src/core/builder/cargo.rs @@ -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 { |
