fix: restore NDEBUG=1 release flags for static builds

- c8f32f9f dropped the NDEBUG branch from both Makefiles, so the
  static containerfiles and the container image, which run
  `make NDEBUG=1 LTO=1 STATIC=1`, built -O0 -g3 with asserts live.
- NDEBUG=1 now selects -O3 -DNDEBUG, matching `make release`, in
  mergerfs and vendored libfuse. NDEBUG=0 or unset is unchanged.
This commit is contained in:
Antonio SJ Musumeci 2026-11-19 14:03:09 -05:00
parent b934e8bd59
commit fe2d94dd1c
2 changed files with 6 additions and 2 deletions

View file

@ -70,7 +70,9 @@ DEBUG_OPT_FLAGS += \
-fno-omit-frame-pointer \
$(SANITIZE)
ifdef RELEASE
ifeq ($(NDEBUG),1)
OPT_FLAGS := -O3 -DNDEBUG $(COMMON_OPT_FLAGS)
else ifdef RELEASE
OPT_FLAGS := -O3 $(COMMON_OPT_FLAGS)
else
OPT_FLAGS ?= $(DEBUG_OPT_FLAGS) $(COMMON_OPT_FLAGS)