From 28b010126a1b39297d8a496ba81f171d8563953b Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Mon, 27 May 2024 14:59:39 -0400 Subject: [PATCH] add DEBUG_LIBSTDCXX option to GNU Make gcc for libstdc++ debug (#3945) this catches bounds errors in the standard library containers --- Tools/GNUMake/comps/gnu.mak | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Tools/GNUMake/comps/gnu.mak b/Tools/GNUMake/comps/gnu.mak index 9e8430ec88d..ff2732b879f 100644 --- a/Tools/GNUMake/comps/gnu.mak +++ b/Tools/GNUMake/comps/gnu.mak @@ -103,6 +103,10 @@ else endif endif +ifeq ($(DEBUG_LIBSTDCXX),TRUE) + CPPFLAGS += -D_GLIBCXX_DEBUG +endif + ifeq ($(WARN_ALL),TRUE) warning_flags = -Wall -Wextra -Wlogical-op -Wfloat-conversion -Wnull-dereference -Wmisleading-indentation -Wduplicated-cond -Wduplicated-branches -Wmissing-include-dirs