Bug 1271829 - Don't clobber XCFLAGS building nss. r=glandium
☠☠ backed out by cbb9d4a22c5c ☠ ☠
authorRalph Giles <giles@mozilla.com>
Fri, 13 May 2016 14:13:39 -0700
changeset 297774 9f4983dfd88188dc9c679d095133fabbcadb48db
parent 297773 28b45df659b7274ea988430538f941ba21dfc2ac
child 297775 d0ab0d508a248687825497a6a50ec9a685a7a5f9
push id30267
push userryanvm@gmail.com
push dateWed, 18 May 2016 16:13:07 +0000
treeherdermozilla-central@c4449eab07d3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1271829
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1271829 - Don't clobber XCFLAGS building nss. r=glandium Previously, this clobbered the XCFLAGS set by MOZ_FOLD_LIBS_FLAGS. Combine them instead so we can pass multiple options through this override mechanism. This is a behaviour change building with --enable-llvm-hacks. MozReview-Commit-ID: 4WP0asnc7Z6
config/external/nss/Makefile.in
--- a/config/external/nss/Makefile.in
+++ b/config/external/nss/Makefile.in
@@ -239,17 +239,17 @@ DEFAULT_GMAKE_FLAGS += \
 endif
 
 DEFAULT_GMAKE_FLAGS += FREEBL_NO_DEPEND=0 $(FREEBL_LOWHASH_FLAG)
 
 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))
 XLDFLAGS := $(OS_LDFLAGS)
 DEFAULT_GMAKE_FLAGS += XLDFLAGS='$(XLDFLAGS)'
 endif
 
 DEFAULT_GMAKE_FLAGS += NSS_NO_PKCS11_BYPASS=1
@@ -262,19 +262,22 @@ DEFAULT_GMAKE_FLAGS += MODULE_INCLUDES='
 # Work around NSS's MAKE_OBJDIR being racy. See bug #836220
 DEFAULT_GMAKE_FLAGS += MAKE_OBJDIR='$$(INSTALL) -D $$(OBJDIR)'
 
 # Work around NSS adding IMPORT_LIBRARY to TARGETS with no rule for
 # it, creating race conditions. See bug #836220
 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 =
 ifndef MOZ_FOLD_LIBS
 NSS_DIRS += nss/lib
 else
 ifndef NSS_DISABLE_DBM
 NSS_DIRS += nss/lib/dbm