Skip to content

Commit a23ee64

Browse files
joshtriplettmikeleany
authored andcommitted
Rename x86_64-unknown-none-elf to x86_64-unknown-none
Most Rust freestanding/bare-metal targets use just `-unknown-none` here, including aarch64-unknown-none, mipsel-unknown-none, and the BPF targets. The *only* target using `-unknown-none-elf` is RISC-V. The underlying toolchain doesn't care; LLVM accepts both `x86_64-unknown-none` and `x86_64-unknown-none-elf`. In addition, there's a long history of embedded x86 targets with varying definitions for the `elf` suffix; on some of those embedded targets, `elf` implied the inclusion of a C library based on newlib or similar. Using `x86_64-unknown-none` avoids any potential ambiguity there. (Work on this target sponsored by Profian.)
1 parent 5ba3a65 commit a23ee64

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

compiler/rustc_target/src/spec/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ supported_targets! {
955955

956956
("armv7-unknown-linux-uclibceabihf", armv7_unknown_linux_uclibceabihf),
957957

958-
("x86_64-unknown-none-elf", x86_64_unknown_none_elf),
958+
("x86_64-unknown-none", x86_64_unknown_none),
959959
}
960960

961961
/// Warnings encountered when parsing the target `json`.

src/doc/rustc/src/platform-support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ target | std | host | notes
285285
`x86_64-unknown-haiku` | ✓ | ✓ | 64-bit Haiku
286286
`x86_64-unknown-hermit` | ? | |
287287
`x86_64-unknown-l4re-uclibc` | ? | |
288-
`x86_64-unknown-none-elf` | * | | Bare x86_64, softfloat
288+
`x86_64-unknown-none` | * | | Freestanding/bare-metal x86_64, softfloat
289289
`x86_64-unknown-none-hermitkernel` | ? | | HermitCore kernel
290290
`x86_64-unknown-none-linuxkernel` | * | | Linux kernel modules
291291
`x86_64-unknown-openbsd` | ✓ | ✓ | 64-bit OpenBSD

0 commit comments

Comments
 (0)