diff --git a/Meta/CMake/common_compile_options.cmake b/Meta/CMake/common_compile_options.cmake index 5dbe15ed898..1b87923fd0e 100644 --- a/Meta/CMake/common_compile_options.cmake +++ b/Meta/CMake/common_compile_options.cmake @@ -69,3 +69,10 @@ if (UNIX AND NOT APPLE AND NOT ENABLE_FUZZERS) add_compile_options(-fno-semantic-interposition) add_compile_options(-fvisibility-inlines-hidden) endif() + +if (NOT WIN32) + add_compile_options(-fstack-protector-strong) + add_link_options(-fstack-protector-strong) +endif() + +add_compile_options(-fstrict-flex-arrays=2)