Skip to content

Commit

Permalink
Fix cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
NobodyXu authored Oct 11, 2024
1 parent c1f07fc commit 7b86b54
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1996,15 +1996,13 @@ impl Build {
cmd.push_cc_arg("-fdata-sections".into());
}
// Disable generation of PIC on bare-metal for now: rust-lld doesn't support this yet
if self.pic.unwrap_or_else(
|| {
!target.contains("windows")
&& !target.contains("-none-")
&& !target.ends_with("-none")
&& !target.contains("uefi")
&& !Build::is_wasi_target(target)
}
) {
if self.pic.unwrap_or_else(|| {
!target.contains("windows")
&& !target.contains("-none-")
&& !target.ends_with("-none")
&& !target.contains("uefi")
&& !Build::is_wasi_target(target)
}) {
cmd.push_cc_arg("-fPIC".into());
// PLT only applies if code is compiled with PIC support,
// and only for ELF targets.
Expand Down

0 comments on commit 7b86b54

Please sign in to comment.