Skip to content

Commit

Permalink
Rollup merge of rust-lang#136309 - onur-ozkan:133629, r=jieyouxu
Browse files Browse the repository at this point in the history
set rustc dylib on manually constructed rustc command

Fixes rust-lang#133629
  • Loading branch information
workingjubilee authored Jan 31, 2025
2 parents 0bd90c4 + 139d6ba commit d82d0c2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/bootstrap/src/core/builder/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -659,14 +659,18 @@ 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")
.arg("--crate-type=proc-macro")
.arg("-")
.run_capture(self)
.stderr();

let not_supported = error
.lines()
.any(|line| line.contains("unsupported crate type `proc-macro`"));
Expand Down

0 comments on commit d82d0c2

Please sign in to comment.