This commit is contained in:
Yuhang Zhao 2023-05-18 16:40:35 +08:00
parent f104a44a0a
commit c70601249a
1 changed files with 1 additions and 1 deletions

View File

@ -579,7 +579,7 @@ function(setup_compile_params)
target_link_options(${__target} PRIVATE
$<$<NOT:$<CONFIG:Debug>>:-Wl,-mguard=cf> # TODO: Do we need "-Wl," here?
)
elseif(APPLE)
elseif(APPLE OR (CMAKE_CXX_COMPILER_ID STREQUAL "GNU"))
target_compile_options(${__target} PRIVATE
$<$<NOT:$<CONFIG:Debug>>:-fcf-protection=full>
)