Skip to content

Commit e574119

Browse files
authored
Only enable fcf-protection on x86 based processors for clang (#1792)
Signed-off-by: Zhou Qiankang <[email protected]>
1 parent aea8ce8 commit e574119

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/compilers/Clang.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ endif()
6565
# Clang flags to prevent compiler from optimizing out security checks
6666
set(TBB_COMMON_COMPILE_FLAGS ${TBB_COMMON_COMPILE_FLAGS} -Wformat -Wformat-security -Werror=format-security -fPIC $<$<NOT:$<BOOL:${EMSCRIPTEN}>>:-fstack-protector-strong>)
6767

68-
if (NOT APPLE AND NOT ANDROID_PLATFORM AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
68+
if (NOT APPLE AND NOT ANDROID_PLATFORM AND CMAKE_SYSTEM_PROCESSOR MATCHES "(AMD64|amd64|i.86|x86)")
6969
set(TBB_LIB_COMPILE_FLAGS ${TBB_LIB_COMPILE_FLAGS} -fstack-clash-protection $<$<NOT:$<BOOL:${EMSCRIPTEN}>>:-fcf-protection=full>)
7070
endif()
7171

0 commit comments

Comments
 (0)