mirror of
https://github.com/ziglang/zig.git
synced 2026-02-21 00:35:10 +00:00
zig cc: Pass -f(no-)(PIC,PIE) to Clang for *-(windows,uefi)-(gnu,cygnus).
The previous supports_fpic() check was too broad.
This commit is contained in:
parent
c620836945
commit
c8b92f3a8e
@ -60,7 +60,12 @@ pub fn picLevel(target: std.Target) u32 {
|
||||
/// This is not whether the target supports Position Independent Code, but whether the -fPIC
|
||||
/// C compiler argument is valid to Clang.
|
||||
pub fn supports_fpic(target: std.Target) bool {
|
||||
return target.os.tag != .windows and target.os.tag != .uefi;
|
||||
return switch (target.os.tag) {
|
||||
.windows,
|
||||
.uefi,
|
||||
=> target.abi == .gnu or target.abi == .cygnus,
|
||||
else => true,
|
||||
};
|
||||
}
|
||||
|
||||
pub fn alwaysSingleThreaded(target: std.Target) bool {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user