diff options
| author | Jieyou Xu <jieyouxu@outlook.com> | 2025-06-10 22:10:10 +0800 |
|---|---|---|
| committer | Jieyou Xu <jieyouxu@outlook.com> | 2025-06-10 22:10:10 +0800 |
| commit | 8ef8062d65055f2b54bd030487ae0e3388aa827a (patch) | |
| tree | a64ad7f3c994d9a242be6d0b8295c39da93f3453 /src/bootstrap | |
| parent | 7c10378e1fee5ddc6573b916aeb884ab10e0de17 (diff) | |
| download | rust-8ef8062d65055f2b54bd030487ae0e3388aa827a.tar.gz rust-8ef8062d65055f2b54bd030487ae0e3388aa827a.zip | |
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.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/src/core/config/toml/target.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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") { |
