From 8ef8062d65055f2b54bd030487ae0e3388aa827a Mon Sep 17 00:00:00 2001 From: Jieyou Xu Date: Tue, 10 Jun 2025 22:10:10 +0800 Subject: Extract target no-std hack to `build_helpers` To centralize this hack in one place with a backlink to the issue tracking this hack, as this logic is also needed by compiletest to implement a `//@ needs-target-std` directive. --- src/bootstrap/src/core/config/toml/target.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/bootstrap') diff --git a/src/bootstrap/src/core/config/toml/target.rs b/src/bootstrap/src/core/config/toml/target.rs index 7f074d1b25e..b8fc3e74c35 100644 --- a/src/bootstrap/src/core/config/toml/target.rs +++ b/src/bootstrap/src/core/config/toml/target.rs @@ -84,7 +84,7 @@ pub struct Target { impl Target { pub fn from_triple(triple: &str) -> Self { let mut target: Self = Default::default(); - if triple.contains("-none") || triple.contains("nvptx") || triple.contains("switch") { + if !build_helper::targets::target_supports_std(triple) { target.no_std = true; } if triple.contains("emscripten") { -- cgit 1.4.1-3-g733a5