aboutsummaryrefslogtreecommitdiff
path: root/src/target.zig
diff options
context:
space:
mode:
authorEric Rowley <earowley23@gmail.com>2023-04-20 16:17:36 -0500
committerVeikka Tuominen <git@vexu.eu>2023-04-21 08:22:27 +0300
commita774f9334473822fd7c6c828dd3fb873788b2f72 (patch)
treeb951aca86b170b204013988b9b46f4d9905528a6 /src/target.zig
parenta86759984c734d34a36bccda73baf60b19f1a633 (diff)
downloadzig-a774f9334473822fd7c6c828dd3fb873788b2f72.tar.gz
zig-a774f9334473822fd7c6c828dd3fb873788b2f72.zip
Do not use -fPIC when compiling a UEFI application
Diffstat (limited to 'src/target.zig')
-rw-r--r--src/target.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target.zig b/src/target.zig
index da69293c35..76186db269 100644
--- a/src/target.zig
+++ b/src/target.zig
@@ -204,7 +204,7 @@ pub fn requiresPIC(target: std.Target, linking_libc: bool) bool {
/// 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;
+ return target.os.tag != .windows and target.os.tag != .uefi;
}
pub fn isSingleThreaded(target: std.Target) bool {