build: Disable stack protectors for the web build since emscripten doesn't support it

This commit is contained in:
WerWolv 2025-02-15 21:08:05 +01:00
parent 5fb488236b
commit 19f925c60b
1 changed files with 4 additions and 1 deletions

View File

@ -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")