Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set rustc dylib on manually constructed rustc command #136309

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading