summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_target/src/spec/tests/tests_impl.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_target/src/spec/tests/tests_impl.rs')
-rw-r--r--compiler/rustc_target/src/spec/tests/tests_impl.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/rustc_target/src/spec/tests/tests_impl.rs b/compiler/rustc_target/src/spec/tests/tests_impl.rs
index 172da0ed5..e0ecf8037 100644
--- a/compiler/rustc_target/src/spec/tests/tests_impl.rs
+++ b/compiler/rustc_target/src/spec/tests/tests_impl.rs
@@ -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).