File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1365,11 +1365,11 @@ impl Build {
1365
1365
cmd. push_cc_arg ( "-ffunction-sections" . into ( ) ) ;
1366
1366
cmd. push_cc_arg ( "-fdata-sections" . into ( ) ) ;
1367
1367
}
1368
- // Disable generation of PIC on RISC-V for now: rust-lld doesn't support this yet
1369
- if self
1370
- . pic
1371
- . unwrap_or ( ! target. contains ( "windows-gnu " ) && ! target. contains ( "riscv " ) )
1372
- {
1368
+ // Disable generation of PIC on bare-metal RISC-V for now: rust-lld doesn't support this yet
1369
+ if self . pic . unwrap_or (
1370
+ !target . contains ( "windows-gnu" )
1371
+ && ! ( target. contains ( "riscv " ) && target. contains ( "-none- " ) ) ,
1372
+ ) {
1373
1373
cmd. push_cc_arg ( "-fPIC" . into ( ) ) ;
1374
1374
// PLT only applies if code is compiled with PIC support,
1375
1375
// and only for ELF targets.
You can’t perform that action at this time.
0 commit comments