Last active
January 12, 2025 09:24
-
-
Save wangjiezhe/1ceae0cd942ae9c97b929cf8619937ee to your computer and use it in GitHub Desktop.
Revert https://github.com/rust-lang/rust/commit/68034f837a39387e49fc7d7c5b088f5372a1127e for rust 1.83.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 0740d1682a043c41fb7154414535e83767f60a32 Mon Sep 17 00:00:00 2001 | |
From: wangjiezhe <[email protected]> | |
Date: Sun, 8 Dec 2024 23:55:55 +0800 | |
Subject: [PATCH] Revert "Disable -Zdual-proc-macros if the target doesn't | |
support proc-macros" | |
This reverts commit 68034f837a39387e49fc7d7c5b088f5372a1127e. | |
--- | |
src/bootstrap/src/core/builder.rs | 20 +++----------------- | |
1 file changed, 3 insertions(+), 17 deletions(-) | |
diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs | |
index 9ac0b0a01f7..0ac9697ba29 100644 | |
--- a/src/bootstrap/src/core/builder.rs | |
+++ b/src/bootstrap/src/core/builder.rs | |
@@ -1698,24 +1698,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"); | |
} | |
} | |
} | |
-- | |
2.45.2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment