diff --git a/config/external/nss/Makefile.in b/config/external/nss/Makefile.in index 8774f20fbff0..df3e022ac271 100644 --- a/config/external/nss/Makefile.in +++ b/config/external/nss/Makefile.in @@ -244,7 +244,7 @@ ifdef MOZ_NO_WLZDEFS DEFAULT_GMAKE_FLAGS += ZDEFS_FLAG= endif ifdef MOZ_CFLAGS_NSS -DEFAULT_GMAKE_FLAGS += XCFLAGS='$(filter-out -W%,$(CFLAGS))' +XCFLAGS += $(filter-out -W%,$(CFLAGS)) DEFAULT_GMAKE_FLAGS += DARWIN_DYLIB_VERSIONS='-compatibility_version 1 -current_version 1 $(LDFLAGS)' endif ifeq (1_1,$(CLANG_CL)_$(MOZ_ASAN)) @@ -267,9 +267,12 @@ DEFAULT_GMAKE_FLAGS += MAKE_OBJDIR='$$(INSTALL) -D $$(OBJDIR)' DEFAULT_GMAKE_FLAGS += TARGETS='$$(LIBRARY) $$(SHARED_LIBRARY) $$(PROGRAM)' ifdef MOZ_FOLD_LIBS_FLAGS -DEFAULT_GMAKE_FLAGS += XCFLAGS='$(MOZ_FOLD_LIBS_FLAGS)' +XCFLAGS += $(MOZ_FOLD_LIBS_FLAGS) endif +# Export accumulated XCFLAGS to modify nss defaults. +DEFAULT_GMAKE_FLAGS += XCFLAGS='$(XCFLAGS)' + NSS_SRCDIR = $(topsrcdir) NSS_DIRS =