From 2ad2e85b5f7a3cc44155a5507d9bd985b274b8e2 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Thu, 9 Jun 2022 23:12:55 +0200 Subject: [PATCH] Unset NDEBUG in analyzers --- src/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Makefile b/src/Makefile index 263a4b34155d6..ce283fa43e0ef 100644 --- a/src/Makefile +++ b/src/Makefile @@ -449,6 +449,8 @@ SKIP_IMPLICIT_ATOMICS := dump.c module.c staticdata.c codegen.cpp # these need to be annotated (and possibly fixed) SKIP_GC_CHECK := codegen.cpp rtutils.c +# make sure LLVM's invariant information is not discarded with -DNDEBUG +clang-sagc-%: JL_CXXFLAGS += -UNDEBUG clang-sagc-%: $(SRCDIR)/%.c $(build_shlibdir)/libGCCheckerPlugin.$(SHLIB_EXT) .FORCE | analyzegc-deps-check @$(call PRINT_ANALYZE, $(build_depsbindir)/clang -D__clang_gcanalyzer__ --analyze -Xanalyzer -analyzer-werror -Xanalyzer -analyzer-output=text --analyzer-no-default-checks \ -Xclang -load -Xclang $(build_shlibdir)/libGCCheckerPlugin.$(SHLIB_EXT) -Xclang -analyzer-checker=core$(COMMA)julia.GCChecker \ @@ -460,6 +462,7 @@ clang-sagc-%: $(SRCDIR)/%.cpp $(build_shlibdir)/libGCCheckerPlugin.$(SHLIB_EXT) $(SA_EXCEPTIONS-$(notdir $<)) \ $(CLANGSA_FLAGS) $(CLANGSA_CXXFLAGS) $(LLVM_CXXFLAGS) $(JCPPFLAGS) $(JCXXFLAGS) $(JL_CXXFLAGS) $(DEBUGFLAGS) -fcolor-diagnostics -x c++ $<) +clang-sa-%: JL_CXXFLAGS += -UNDEBUG clang-sa-%: $(SRCDIR)/%.c .FORCE | analyzegc-deps-check @$(call PRINT_ANALYZE, $(build_depsbindir)/clang --analyze -Xanalyzer -analyzer-werror -Xanalyzer -analyzer-output=text \ -Xanalyzer -analyzer-disable-checker=deadcode.DeadStores \