From 504b0bdaaa7fb7c822014d8bd2845299fbdaf0e8 Mon Sep 17 00:00:00 2001 From: Emanuel Peter Date: Tue, 17 Oct 2023 07:14:11 +0000 Subject: [PATCH] 8318078: ADLC: pass ASSERT and PRODUCT flags Reviewed-by: ihse, erikj, kvn --- make/hotspot/gensrc/GensrcAdlc.gmk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/make/hotspot/gensrc/GensrcAdlc.gmk b/make/hotspot/gensrc/GensrcAdlc.gmk index 1b752bacc00..0898d91e1c2 100644 --- a/make/hotspot/gensrc/GensrcAdlc.gmk +++ b/make/hotspot/gensrc/GensrcAdlc.gmk @@ -133,6 +133,21 @@ ifeq ($(call check-jvm-feature, compiler2), true) ADLCFLAGS += -DARM=1 endif + # Set ASSERT, NDEBUG and PRODUCT flags just like in JvmFlags.gmk + ifeq ($(DEBUG_LEVEL), release) + # release builds disable uses of assert macro from . + ADLCFLAGS += -DNDEBUG + # For hotspot, release builds differ internally between "optimized" and "product" + # in that "optimize" does not define PRODUCT. + ifneq ($(HOTSPOT_DEBUG_LEVEL), optimized) + ADLCFLAGS += -DPRODUCT + endif + else ifeq ($(DEBUG_LEVEL), fastdebug) + ADLCFLAGS += -DASSERT + else ifeq ($(DEBUG_LEVEL), slowdebug) + ADLCFLAGS += -DASSERT + endif + ############################################################################## # Concatenate all ad source files into a single file, which will be fed to # adlc. Also include a #line directive at the start of every included file