From 5680ed50357f7526a70a34e0385a77b925cf1dac Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Fri, 30 Apr 2021 16:06:50 +0200 Subject: [PATCH] Enable additional assertions in debug builds --- meson.build | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/meson.build b/meson.build index 93c4e8e8..b6246e51 100644 --- a/meson.build +++ b/meson.build @@ -43,6 +43,12 @@ compiler_options = [ # this flag. '-msse2', ] + +# Enable addition assertions on the STL containers during debug builds +if get_option('buildtype') == 'debug' + compiler_options += ['-D_GLIBCXX_DEBUG'] +endif + # NOTE: GCC doesn't 8-byte align doubles in structs on x86 for ABI-compatibilty # reasons, but MSVC++ does. We need to force this same alignment to be # ABI-compatible with 32-bit binaries created with MSVC++ on Windows.