Skip to content

Commit

Permalink
set rustc dylib on manually constructed rustc command
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <work@onurozkan.dev>
  • Loading branch information
onur-ozkan committed Jan 30, 2025
1 parent 0cc4f4f commit 139d6ba
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 @@ -653,14 +653,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 139d6ba

Please sign in to comment.