We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 661800e commit a43c1f7Copy full SHA for a43c1f7
src/lib.rs
@@ -1366,10 +1366,10 @@ impl Build {
1366
cmd.push_cc_arg("-fdata-sections".into());
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
- {
+ if self.pic.unwrap_or(
+ !target.contains("windows-gnu")
+ && !(target.contains("riscv") && target.contains("-none-")),
+ ) {
1373
cmd.push_cc_arg("-fPIC".into());
1374
// PLT only applies if code is compiled with PIC support,
1375
// and only for ELF targets.
0 commit comments