From aa77d239a4d1eb0ed281f48d5863702439a9b11c Mon Sep 17 00:00:00 2001 From: Hadi Chokr Date: Thu, 2 Apr 2026 10:53:06 +0200 Subject: [PATCH] Add -D_FORTIFY_SOURCE=2 to compiler flags Be way more aggressive towards Memory Violations. Signed-off-by: Hadi Chokr --- meson.build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index d6c7a6082..7c5086bee 100644 --- a/meson.build +++ b/meson.build @@ -6,7 +6,7 @@ project( default_options: [ 'cpp_std=c++23', 'warning_level=0', - 'buildtype=debug', # for now + 'buildtype=debugoptimized', # for now 'unity=on', # merge source files per target 'unity_size=8', # TODO: mess around with this 'b_pch=true', # precompiled headers @@ -24,6 +24,7 @@ global_cpp_defs = [ '-D_EXTENDED_ACHIEVEMENTS', '-D_DEBUG_MENUS_ENABLED', '-D_DEBUG', + '-D_FORTIFY_SOURCE=2', '-DDEBUG', ] @@ -85,4 +86,3 @@ subdir('targets/platform') subdir('targets/resources') subdir('targets/minecraft') subdir('targets/app') -