Skip to content

Commit 1bb6760

Browse files
authored
Rollup merge of #69563 - andre-richter:fix_no_std_match, r=Mark-Simulacrum
Fix no_std detection for target triples The current check for wether a target is no_std or not is matching for the string `-none-` in a target triple. This doesn't work for triples that end in `-none`, like `aarch64-unknown-none`. Fix this by matching for `-none` instead. I checked for all the current target triples containing `none`, and this should not generate any false positives. This fixes an issue encountered in #68334
2 parents c8db7dc + 7cf2bfb commit 1bb6760

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bootstrap/config.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ pub struct Target {
180180
impl Target {
181181
pub fn from_triple(triple: &str) -> Self {
182182
let mut target: Self = Default::default();
183-
if triple.contains("-none-") || triple.contains("nvptx") {
183+
if triple.contains("-none") || triple.contains("nvptx") {
184184
target.no_std = true;
185185
}
186186
target

0 commit comments

Comments
 (0)