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 {
847847
848848 /// Configures whether the compiler will emit position independent code.
849849 ///
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
851851 /// to `true` for all other targets.
852852 pub fn pic ( & mut self , pic : bool ) -> & mut Build {
853853 self . pic = Some ( pic) ;
@@ -1371,11 +1371,11 @@ impl Build {
13711371 cmd. push_cc_arg ( "-ffunction-sections" . into ( ) ) ;
13721372 cmd. push_cc_arg ( "-fdata-sections" . into ( ) ) ;
13731373 }
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+ {
13791379 cmd. push_cc_arg ( "-fPIC" . into ( ) ) ;
13801380 // PLT only applies if code is compiled with PIC support,
13811381 // and only for ELF targets.
You can’t perform that action at this time.
0 commit comments