File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -847,7 +847,7 @@ impl Build {
847
847
848
848
/// Configures whether the compiler will emit position independent code.
849
849
///
850
- /// This option defaults to `false` for `windows-gnu` and `riscv` targets and
850
+ /// This option defaults to `false` for `windows-gnu` and bare metal targets and
851
851
/// to `true` for all other targets.
852
852
pub fn pic ( & mut self , pic : bool ) -> & mut Build {
853
853
self . pic = Some ( pic) ;
@@ -1371,11 +1371,11 @@ impl Build {
1371
1371
cmd. push_cc_arg ( "-ffunction-sections" . into ( ) ) ;
1372
1372
cmd. push_cc_arg ( "-fdata-sections" . into ( ) ) ;
1373
1373
}
1374
- // Disable generation of PIC on bare-metal RISC-V for now: rust-lld doesn't support this yet
1375
- if self . pic . unwrap_or (
1376
- !target . contains ( "windows-gnu" )
1377
- && ! ( target. contains ( "riscv " ) && target. contains ( "-none-" ) ) ,
1378
- ) {
1374
+ // Disable generation of PIC on bare-metal for now: rust-lld doesn't support this yet
1375
+ if self
1376
+ . pic
1377
+ . unwrap_or ( ! target. contains ( "windows-gnu " ) && ! target. contains ( "-none-" ) )
1378
+ {
1379
1379
cmd. push_cc_arg ( "-fPIC" . into ( ) ) ;
1380
1380
// PLT only applies if code is compiled with PIC support,
1381
1381
// and only for ELF targets.
You can’t perform that action at this time.
0 commit comments