Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save wangjiezhe/4746eb318e131c4b97ffbe0a753587b3 to your computer and use it in GitHub Desktop.
Save wangjiezhe/4746eb318e131c4b97ffbe0a753587b3 to your computer and use it in GitHub Desktop.
diff --git a/src/bootstrap/src/core/builder/cargo.rs b/src/bootstrap/src/core/builder/cargo.rs
index 0688a1d6892..8ec9747af5c 100644
--- a/src/bootstrap/src/core/builder/cargo.rs
+++ b/src/bootstrap/src/core/builder/cargo.rs
@@ -643,24 +643,10 @@ fn cargo(
match mode {
Mode::Std | Mode::ToolBootstrap | Mode::ToolStd => {}
Mode::Rustc | Mode::Codegen | Mode::ToolRustc => {
- // Build proc macros both for the host and the target unless proc-macros are not
- // supported by the target.
+ // Build proc macros both for the host and the target
if target != compiler.host && cmd_kind != Kind::Check {
- let error = command(self.rustc(compiler))
- .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`"));
- if !not_supported {
- cargo.arg("-Zdual-proc-macros");
- rustflags.arg("-Zdual-proc-macros");
- }
+ cargo.arg("-Zdual-proc-macros");
+ rustflags.arg("-Zdual-proc-macros");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment