From b4d532b8092e917acf4bcc7047406e44899d1762 Mon Sep 17 00:00:00 2001 From: Carlo Bramini Date: Sat, 5 Feb 2022 13:05:40 +0000 Subject: [PATCH] Don't set "-fstack-clash-protection" option on Windows Signed-off-by: Carlo Bramini Reviewed-by: Jakub Jelen --- CompilerChecks.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CompilerChecks.cmake b/CompilerChecks.cmake index 5bdc05c3..9acae281 100644 --- a/CompilerChecks.cmake +++ b/CompilerChecks.cmake @@ -85,9 +85,11 @@ if (UNIX) endif() endif (WITH_STACK_PROTECTOR_STRONG) - check_c_compiler_flag_ssp("-fstack-clash-protection" WITH_STACK_CLASH_PROTECTION) - if (WITH_STACK_CLASH_PROTECTION) - list(APPEND SUPPORTED_COMPILER_FLAGS "-fstack-clash-protection") + if (NOT WINDOWS AND NOT CYGWIN) + check_c_compiler_flag_ssp("-fstack-clash-protection" WITH_STACK_CLASH_PROTECTION) + if (WITH_STACK_CLASH_PROTECTION) + list(APPEND SUPPORTED_COMPILER_FLAGS "-fstack-clash-protection") + endif() endif() if (PICKY_DEVELOPER)