Skip to content

Commit f397a67

Browse files
slipherillwieckz
authored andcommitted
Don't set -pie flag with AppleClang
Apparently it doesn't do anything, and triggers a warning about an unused command line argument. When USE_HARDENING is enabled, this warning breaks a bunch of other try_compile's, causing flags to be rejected that should have been accepted.
1 parent b508727 commit f397a67

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmake/DaemonFlags.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,9 @@ else()
340340

341341
if (NOT NACL OR (NACL AND GAME_PIE))
342342
try_c_cxx_flag(FPIE "-fPIE")
343-
try_linker_flag(LINKER_PIE "-pie")
343+
if (NOT APPLE)
344+
try_linker_flag(LINKER_PIE "-pie")
345+
endif()
344346
endif()
345347

346348
if ("${FLAG_LINKER_PIE}" AND MINGW)

0 commit comments

Comments
 (0)