Remove linuxkernel targets

These are not used by the actual Rust-for-Linux project, so they're mostly just confusing.
This commit is contained in:
Alex Gaynor
2022-11-05 12:30:28 -04:00
parent b0f3940c35
commit c33ee13391
6 changed files with 5 additions and 57 deletions

View File

@@ -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");
@@ -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).