From 19f925c60b450642c7ca205160faec29cea07fe3 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sat, 15 Feb 2025 21:08:05 +0100 Subject: [PATCH] build: Disable stack protectors for the web build since emscripten doesn't support it --- cmake/build_helpers.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake index e8505fdd5..5c725500a 100644 --- a/cmake/build_helpers.cmake +++ b/cmake/build_helpers.cmake @@ -663,7 +663,10 @@ macro(setupCompilerFlags target) # Enable hardening flags addCommonFlag("-U_FORTIFY_SOURCE" ${target}) addCommonFlag("-D_FORTIFY_SOURCE=3" ${target}) - addCommonFlag("-fstack-protector-strong" ${target}) + + if (NOT EMSCRIPTEN) + addCommonFlag("-fstack-protector-strong" ${target}) + endif() endif() if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")