Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove linuxkernel targets #104015

Merged
merged 1 commit into from
Nov 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions compiler/rustc_target/src/spec/linux_kernel_base.rs

This file was deleted.

5 changes: 1 addition & 4 deletions compiler/rustc_target/src/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ mod illumos_base;
mod l4re_base;
mod linux_base;
mod linux_gnu_base;
mod linux_kernel_base;
mod linux_musl_base;
mod linux_uclibc_base;
mod msvc_base;
Expand Down Expand Up @@ -1003,7 +1002,7 @@ macro_rules! supported_targets {
$(
#[test] // `#[test]`
fn $module() {
tests_impl::test_target(super::$module::target(), $triple);
tests_impl::test_target(super::$module::target());
}
)+
}
Expand Down Expand Up @@ -1071,8 +1070,6 @@ supported_targets! {
("thumbv7neon-linux-androideabi", thumbv7neon_linux_androideabi),
("aarch64-linux-android", aarch64_linux_android),

("x86_64-unknown-none-linuxkernel", x86_64_unknown_none_linuxkernel),

("aarch64-unknown-freebsd", aarch64_unknown_freebsd),
("armv6-unknown-freebsd", armv6_unknown_freebsd),
("armv7-unknown-freebsd", armv7_unknown_freebsd),
Expand Down
9 changes: 4 additions & 5 deletions compiler/rustc_target/src/spec/tests/tests_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ use super::super::*;
use std::assert_matches::assert_matches;

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

impl Target {
fn check_consistency(&self, triple: &str) {
fn check_consistency(&self) {
assert_eq!(self.is_like_osx, self.vendor == "apple");
assert_eq!(self.is_like_solaris, self.os == "solaris" || self.os == "illumos");
assert_eq!(self.is_like_windows, self.os == "windows" || self.os == "uefi");
Expand Down Expand Up @@ -129,8 +129,7 @@ impl Target {
if self.dynamic_linking && !(self.is_like_wasm && self.os != "emscripten") {
assert_eq!(self.relocation_model, RelocModel::Pic);
}
// PIEs are supported but not enabled by default with linuxkernel target.
if self.position_independent_executables && !triple.ends_with("-linuxkernel") {
if self.position_independent_executables {
assert_eq!(self.relocation_model, RelocModel::Pic);
}
// The UEFI targets do not support dynamic linking but still require PIC (#101377).
Expand Down
28 changes: 0 additions & 28 deletions compiler/rustc_target/src/spec/x86_64_unknown_none_linuxkernel.rs

This file was deleted.

1 change: 0 additions & 1 deletion library/unwind/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ cfg_if::cfg_if! {
target_os = "espidf",
))] {
// These "unix" family members do not have unwinder.
// Note this also matches x86_64-unknown-none-linuxkernel.
} else if #[cfg(any(
unix,
windows,
Expand Down
1 change: 0 additions & 1 deletion src/doc/rustc/src/platform-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,6 @@ target | std | host | notes
`x86_64-unknown-haiku` | ✓ | ✓ | 64-bit Haiku
`x86_64-unknown-hermit` | ✓ | | HermitCore
`x86_64-unknown-l4re-uclibc` | ? | |
`x86_64-unknown-none-linuxkernel` | * | | Linux kernel modules
[`x86_64-unknown-openbsd`](platform-support/openbsd.md) | ✓ | ✓ | 64-bit OpenBSD
[`x86_64-unknown-uefi`](platform-support/unknown-uefi.md) | * | | 64-bit UEFI
`x86_64-uwp-windows-gnu` | ✓ | |
Expand Down