Skip to content

Commit c33ee13

Browse files
committed
Remove linuxkernel targets
These are not used by the actual Rust-for-Linux project, so they're mostly just confusing.
1 parent b0f3940 commit c33ee13

File tree

6 files changed

+5
-57
lines changed

6 files changed

+5
-57
lines changed

compiler/rustc_target/src/spec/linux_kernel_base.rs

-18
This file was deleted.

compiler/rustc_target/src/spec/mod.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ mod illumos_base;
7171
mod l4re_base;
7272
mod linux_base;
7373
mod linux_gnu_base;
74-
mod linux_kernel_base;
7574
mod linux_musl_base;
7675
mod linux_uclibc_base;
7776
mod msvc_base;
@@ -1003,7 +1002,7 @@ macro_rules! supported_targets {
10031002
$(
10041003
#[test] // `#[test]`
10051004
fn $module() {
1006-
tests_impl::test_target(super::$module::target(), $triple);
1005+
tests_impl::test_target(super::$module::target());
10071006
}
10081007
)+
10091008
}
@@ -1071,8 +1070,6 @@ supported_targets! {
10711070
("thumbv7neon-linux-androideabi", thumbv7neon_linux_androideabi),
10721071
("aarch64-linux-android", aarch64_linux_android),
10731072

1074-
("x86_64-unknown-none-linuxkernel", x86_64_unknown_none_linuxkernel),
1075-
10761073
("aarch64-unknown-freebsd", aarch64_unknown_freebsd),
10771074
("armv6-unknown-freebsd", armv6_unknown_freebsd),
10781075
("armv7-unknown-freebsd", armv7_unknown_freebsd),

compiler/rustc_target/src/spec/tests/tests_impl.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ use super::super::*;
22
use std::assert_matches::assert_matches;
33

44
// Test target self-consistency and JSON encoding/decoding roundtrip.
5-
pub(super) fn test_target(mut target: Target, triple: &str) {
5+
pub(super) fn test_target(mut target: Target) {
66
let recycled_target = Target::from_json(target.to_json()).map(|(j, _)| j);
77
target.update_to_cli();
8-
target.check_consistency(triple);
8+
target.check_consistency();
99
assert_eq!(recycled_target, Ok(target));
1010
}
1111

1212
impl Target {
13-
fn check_consistency(&self, triple: &str) {
13+
fn check_consistency(&self) {
1414
assert_eq!(self.is_like_osx, self.vendor == "apple");
1515
assert_eq!(self.is_like_solaris, self.os == "solaris" || self.os == "illumos");
1616
assert_eq!(self.is_like_windows, self.os == "windows" || self.os == "uefi");
@@ -129,8 +129,7 @@ impl Target {
129129
if self.dynamic_linking && !(self.is_like_wasm && self.os != "emscripten") {
130130
assert_eq!(self.relocation_model, RelocModel::Pic);
131131
}
132-
// PIEs are supported but not enabled by default with linuxkernel target.
133-
if self.position_independent_executables && !triple.ends_with("-linuxkernel") {
132+
if self.position_independent_executables {
134133
assert_eq!(self.relocation_model, RelocModel::Pic);
135134
}
136135
// The UEFI targets do not support dynamic linking but still require PIC (#101377).

compiler/rustc_target/src/spec/x86_64_unknown_none_linuxkernel.rs

-28
This file was deleted.

library/unwind/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ cfg_if::cfg_if! {
1515
target_os = "espidf",
1616
))] {
1717
// These "unix" family members do not have unwinder.
18-
// Note this also matches x86_64-unknown-none-linuxkernel.
1918
} else if #[cfg(any(
2019
unix,
2120
windows,

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

-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,6 @@ target | std | host | notes
309309
`x86_64-unknown-haiku` | ✓ | ✓ | 64-bit Haiku
310310
`x86_64-unknown-hermit` | ✓ | | HermitCore
311311
`x86_64-unknown-l4re-uclibc` | ? | |
312-
`x86_64-unknown-none-linuxkernel` | * | | Linux kernel modules
313312
[`x86_64-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | 64-bit OpenBSD
314313
[`x86_64-unknown-uefi`](platform-support/unknown-uefi.md) | * | | 64-bit UEFI
315314
`x86_64-uwp-windows-gnu` | ✓ | |

0 commit comments

Comments
 (0)