From a774f9334473822fd7c6c828dd3fb873788b2f72 Mon Sep 17 00:00:00 2001 From: Eric Rowley Date: Thu, 20 Apr 2023 16:17:36 -0500 Subject: [PATCH] Do not use -fPIC when compiling a UEFI application --- src/target.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {