@@ -2,15 +2,15 @@ use super::super::*;
22use 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
1212impl 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).
0 commit comments