authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-01-23 19:45:39+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-01-23 21:16:03+01:00
logc699bb81347dc0c9371c7c6c2cddab457cbe02ba
tree3e6726b279cf299d87b928d348481085a8e0e9dd
parent909159ad8ea9203297c0b670446381c537554525
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

zig cc: don't bother passing -fPIC to Clang for Windows and UEFI targets

It's completely ignored anyway, by design, for compatibility reasons.

1 files changed, 1 insertions(+), 3 deletions(-)

src/target.zig+1-3
......@@ -79,9 +79,7 @@ pub fn picLevel(target: *const std.Target) u32 {
7979/// C compiler argument is valid to Clang.
8080pub fn supports_fpic(target: *const std.Target) bool {
8181 return switch (target.os.tag) {
82 .windows,
83 .uefi,
84 => target.abi == .gnu,
82 .windows, .uefi => false, // Technically allowed for `Abi.gnu`, but completely ignored by Clang (by design) anyway.
8583 else => true,
8684 };
8785}