Meta: Enable stack clash protection on Linux

Pass -fstack-clash-protection for Linux builds. This asks the
compiler to probe large stack allocations incrementally so they cannot
skip over stack guard pages.
This commit is contained in:
Andreas Kling 2026-06-10 00:23:38 +02:00 committed by Andreas Kling
parent 30ec75ee74
commit 65eddc925c

View file

@ -199,6 +199,7 @@ endif()
if (LINUX)
add_cxx_compile_definitions(_FILE_OFFSET_BITS=64)
add_cxx_compile_options(-fstack-clash-protection)
add_cxx_link_option_if_supported(LINKER:-z,relro)
add_cxx_link_option_if_supported(LINKER:-z,now)
endif()