mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-22 06:28:52 +00:00
clang: fix -pie flag
This commit is contained in:
parent
0a1ddc2eff
commit
f93db0d46a
@ -737,7 +737,12 @@ else()
|
||||
# PIE executables randomly crash at startup with ASAN
|
||||
# Windows binaries die on startup with PIE when compiled with GCC <9.x
|
||||
# Windows dynamically-linked binaries die on startup with PIE regardless of GCC version
|
||||
add_linker_flag_if_supported(-pie LD_SECURITY_FLAGS)
|
||||
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
|
||||
# Clang does not support -pie flag
|
||||
add_linker_flag_if_supported("-Wl,-pie" LD_SECURITY_FLAGS)
|
||||
else()
|
||||
add_linker_flag_if_supported("-pie" LD_SECURITY_FLAGS)
|
||||
endif()
|
||||
endif()
|
||||
add_linker_flag_if_supported(-Wl,-z,relro LD_SECURITY_FLAGS)
|
||||
add_linker_flag_if_supported(-Wl,-z,now LD_SECURITY_FLAGS)
|
||||
|
Loading…
Reference in New Issue
Block a user