Skip to content

Commit 759366b

Browse files
committed
Handle ToolTarget when setting RUSTC_FORCE_UNSTABLE
1 parent 46851d3 commit 759366b

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

src/bootstrap/src/core/builder/cargo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ impl Builder<'_> {
599599
// sysroot. Passing this cfg enables raw-dylib support instead, which makes the native
600600
// library unnecessary. This can be removed when windows-rs enables raw-dylib
601601
// unconditionally.
602-
if let Mode::Rustc | Mode::ToolRustc | Mode::ToolBootstrap = mode {
602+
if let Mode::Rustc | Mode::ToolRustc | Mode::ToolBootstrap | Mode::ToolTarget = mode {
603603
rustflags.arg("--cfg=windows_raw_dylib");
604604
}
605605

src/bootstrap/src/core/builder/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -959,6 +959,7 @@ impl<'a> Builder<'a> {
959959
tool::RemoteTestServer,
960960
tool::RemoteTestClient,
961961
tool::RustInstaller,
962+
tool::FeaturesStatusDump,
962963
tool::Cargo,
963964
tool::RustAnalyzer,
964965
tool::RustAnalyzerProcMacroSrv,

src/bootstrap/src/lib.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,21 @@ pub enum Mode {
287287

288288
impl Mode {
289289
pub fn is_tool(&self) -> bool {
290-
matches!(self, Mode::ToolBootstrap | Mode::ToolRustc | Mode::ToolStd)
290+
match self {
291+
Mode::ToolBootstrap | Mode::ToolRustc | Mode::ToolStd | Mode::ToolTarget => true,
292+
Mode::Std | Mode::Codegen | Mode::Rustc => false,
293+
}
291294
}
292295

293296
pub fn must_support_dlopen(&self) -> bool {
294-
matches!(self, Mode::Std | Mode::Codegen)
297+
match self {
298+
Mode::Std | Mode::Codegen => true,
299+
Mode::ToolBootstrap
300+
| Mode::ToolRustc
301+
| Mode::ToolStd
302+
| Mode::ToolTarget
303+
| Mode::Rustc => false,
304+
}
295305
}
296306
}
297307

0 commit comments

Comments
 (0)