Skip to content

Commit 63d56c5

Browse files
committed
src/target.cpp: UEFI improvements
1 parent 9e11f67 commit 63d56c5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/target.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ uint32_t target_c_type_size_in_bits(const ZigTarget *target, CIntType id) {
989989
}
990990

991991
bool target_allows_addr_zero(const ZigTarget *target) {
992-
return target->os == OsFreestanding;
992+
return target->os == OsFreestanding || target->os == OsUefi;
993993
}
994994

995995
const char *target_o_file_ext(const ZigTarget *target) {
@@ -1414,12 +1414,12 @@ bool target_supports_fpic(const ZigTarget *target) {
14141414
}
14151415

14161416
bool target_supports_stack_probing(const ZigTarget *target) {
1417-
return target->os != OsWindows && (target->arch == ZigLLVM_x86 || target->arch == ZigLLVM_x86_64);
1417+
return target->os != OsWindows && target->os != OsUefi && (target->arch == ZigLLVM_x86 || target->arch == ZigLLVM_x86_64);
14181418
}
14191419

14201420
bool target_requires_pic(const ZigTarget *target, bool linking_libc) {
14211421
// This function returns whether non-pic code is completely invalid on the given target.
1422-
return target->os == OsWindows || target_os_requires_libc(target->os) ||
1422+
return target->os == OsWindows || target->os == OsUefi || target_os_requires_libc(target->os) ||
14231423
(linking_libc && target_is_glibc(target));
14241424
}
14251425

0 commit comments

Comments
 (0)