mirror of
https://github.com/mtrojnar/osslsigncode.git
synced 2025-04-05 09:08:04 -05:00
Avoid link failures on Darwin when AppleClang not matched (#246)
This commit is contained in:
parent
93f5f800d6
commit
44a6768089
@ -98,13 +98,13 @@ function(add_compile_flags target)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
# Support address space layout randomization (ASLR)
|
# Support address space layout randomization (ASLR)
|
||||||
if(NOT (MINGW OR CYGWIN OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang"))
|
if(NOT (MINGW OR CYGWIN OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang" OR ((CMAKE_SYSTEM_NAME MATCHES Darwin) AND (CMAKE_C_COMPILER_ID MATCHES Clang))))
|
||||||
target_compile_options(${target} PRIVATE -fPIE)
|
target_compile_options(${target} PRIVATE -fPIE)
|
||||||
target_link_options(${target} PRIVATE -fPIE -pie)
|
target_link_options(${target} PRIVATE -fPIE -pie)
|
||||||
target_link_options(${target} PRIVATE -Wl,-z,relro)
|
target_link_options(${target} PRIVATE -Wl,-z,relro)
|
||||||
target_link_options(${target} PRIVATE -Wl,-z,now)
|
target_link_options(${target} PRIVATE -Wl,-z,now)
|
||||||
target_link_options(${target} PRIVATE -Wl,-z,noexecstack)
|
target_link_options(${target} PRIVATE -Wl,-z,noexecstack)
|
||||||
endif(NOT (MINGW OR CYGWIN OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang"))
|
endif(NOT (MINGW OR CYGWIN OR CMAKE_C_COMPILER_ID STREQUAL "AppleClang" OR ((CMAKE_SYSTEM_NAME MATCHES Darwin) AND (CMAKE_C_COMPILER_ID MATCHES Clang))))
|
||||||
target_link_options(${target} PRIVATE -fstack-check)
|
target_link_options(${target} PRIVATE -fstack-check)
|
||||||
add_compile_flag_to_targets(${target})
|
add_compile_flag_to_targets(${target})
|
||||||
endif(MSVC)
|
endif(MSVC)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user