File tree 2 files changed +18
-1
lines changed
2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -1997,7 +1997,7 @@ impl Build {
1997
1997
if self . pic . unwrap_or (
1998
1998
target. os != "windows"
1999
1999
&& target. os != "none"
2000
- && target. env != "uefi"
2000
+ && target. os != "uefi"
2001
2001
&& target. os != "wasi" ,
2002
2002
) {
2003
2003
cmd. push_cc_arg ( "-fPIC" . into ( ) ) ;
Original file line number Diff line number Diff line change @@ -283,6 +283,23 @@ fn gnu_aarch64_none_no_pic() {
283
283
}
284
284
}
285
285
286
+ #[ test]
287
+ fn gnu_uefi_no_pic ( ) {
288
+ reset_env ( ) ;
289
+
290
+ for arch in & [ "aarch64" , "i686" , "x86_64" ] {
291
+ let target = format ! ( "{}-unknown-uefi" , arch) ;
292
+ let test = Test :: gnu ( ) ;
293
+ test. gcc ( )
294
+ . target ( & target)
295
+ . host ( & target)
296
+ . file ( "foo.c" )
297
+ . compile ( "foo" ) ;
298
+
299
+ test. cmd ( 0 ) . must_not_have ( "-fPIC" ) ;
300
+ }
301
+ }
302
+
286
303
#[ test]
287
304
fn gnu_set_stdlib ( ) {
288
305
reset_env ( ) ;
You can’t perform that action at this time.
0 commit comments