about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2025-02-04 06:13:59 +0100
committerGitHub <noreply@github.com>2025-02-04 06:13:59 +0100
commita24d859f19bbefe5371694f318568b0ab5a13299 (patch)
treec98c567b9e0cf2e67de1806c7bc04a0562057206
parent4f3a11dff63358bb9091fd51cfdba0b2bd9cf930 (diff)
parent139d6ba054a1a4cc5fe64981ad46fd5547bd4916 (diff)
downloadrust-a24d859f19bbefe5371694f318568b0ab5a13299.tar.gz
rust-a24d859f19bbefe5371694f318568b0ab5a13299.zip
Rollup merge of #136309 - onur-ozkan:133629, r=jieyouxu
set rustc dylib on manually constructed rustc command

Fixes #133629
-rw-r--r--src/bootstrap/src/core/builder/cargo.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs
index f6a03a386d1..2ecab262413 100644
--- a/src/bootstrap/src/core/builder/cargo.rs
+++ b/src/bootstrap/src/core/builder/cargo.rs
@@ -659,7 +659,10 @@ impl Builder<'_> {
                 // Build proc macros both for the host and the target unless proc-macros are not
                 // supported by the target.
                 if target != compiler.host && cmd_kind != Kind::Check {
-                    let error = command(self.rustc(compiler))
+                    let mut rustc_cmd = command(self.rustc(compiler));
+                    self.add_rustc_lib_path(compiler, &mut rustc_cmd);
+
+                    let error = rustc_cmd
                         .arg("--target")
                         .arg(target.rustc_target_arg())
                         .arg("--print=file-names")
@@ -667,6 +670,7 @@ impl Builder<'_> {
                         .arg("-")
                         .run_capture(self)
                         .stderr();
+
                     let not_supported = error
                         .lines()
                         .any(|line| line.contains("unsupported crate type `proc-macro`"));