Bug 1271830 - Propagate MSVC -arch switch to nss. r=glandium
☠☠ backed out by cbb9d4a22c5c ☠ ☠
authorRalph Giles <giles@mozilla.com>
Fri, 13 May 2016 14:16:49 -0700
changeset 297775 d0ab0d508a248687825497a6a50ec9a685a7a5f9
parent 297774 9f4983dfd88188dc9c679d095133fabbcadb48db
child 297776 1b2d84bdba961202dbc000051532e99248a6461c
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
bugs1271830
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 1271830 - Propagate MSVC -arch switch to nss. r=glandium This updates the nss build to require SSE2 instructions on win32. By default nss builds with -arch:IA32 for maximum compatibility. Firefox 49 dropped support for non-SSE2 platforms, so propagate that to the nss external build. XCFLAGS come after the nss build's default settings, and the last -arch switch will override the previous ones. MozReview-Commit-ID: 2lfDq0e0T7Y
config/external/nss/Makefile.in
--- a/config/external/nss/Makefile.in
+++ b/config/external/nss/Makefile.in
@@ -265,16 +265,23 @@ DEFAULT_GMAKE_FLAGS += MAKE_OBJDIR='$$(I
 # 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
 XCFLAGS += $(MOZ_FOLD_LIBS_FLAGS)
 endif
 
+# Pass on the MSVC target arch from the main build system.
+# Note this is case- and switch-character sensitive, while
+# the MSVC option is not.
+ifeq (WINNT,$(OS_TARGET))
+XCFLAGS += $(filter -arch:%,$(CFLAGS))
+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