Skip to content

Commit 3993f00

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 b9f229f commit 3993f00

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
@@ -944,7 +944,7 @@ supported_targets! {
944944

945945
("armv6k-nintendo-3ds", armv6k_nintendo_3ds),
946946

947-
("x86_64-unknown-none-elf", x86_64_unknown_none_elf),
947+
("x86_64-unknown-none", x86_64_unknown_none),
948948
}
949949

950950
/// 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
@@ -280,7 +280,7 @@ target | std | host | notes
280280
`x86_64-unknown-haiku` | ✓ | ✓ | 64-bit Haiku
281281
`x86_64-unknown-hermit` | ? | |
282282
`x86_64-unknown-l4re-uclibc` | ? | |
283-
`x86_64-unknown-none-elf` | * | | Bare x86_64, softfloat
283+
`x86_64-unknown-none` | * | | Freestanding/bare-metal x86_64, softfloat
284284
`x86_64-unknown-none-hermitkernel` | ? | | HermitCore kernel
285285
`x86_64-unknown-none-linuxkernel` | * | | Linux kernel modules
286286
`x86_64-unknown-openbsd` | ✓ | ✓ | 64-bit OpenBSD

0 commit comments

Comments
 (0)