Bug 1271829 - Propagate MSVC -arch switch to nss. r=glandium
authorRalph Giles <giles@mozilla.com>
Fri, 13 May 2016 14:16:49 -0700
changeset 298346 b0c9aee8f2950a929b25c5a9da5aefb1d595aa9f
parent 298345 040014a28b11a0c3aec7f7dfa69e0c1f4125141d
child 298347 c8aa1182309ba12b21ee12641b57a53f4a419f5c
push id19356
push usercbook@mozilla.com
push dateTue, 24 May 2016 13:16:37 +0000
treeherderfx-team@f074838712a0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1271829
milestone49.0a1
Bug 1271829 - 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. Bump CLOBBER because we've had trouble with file removal permission errors on integration builds. MozReview-Commit-ID: 2lfDq0e0T7Y
CLOBBER
config/external/nss/Makefile.in
--- a/CLOBBER
+++ b/CLOBBER
@@ -17,9 +17,9 @@
 #
 # Modifying this file will now automatically clobber the buildbot machines \o/
 #
 
 # Are you updating CLOBBER because you think it's needed for your WebIDL
 # changes to stick? As of bug 928195, this shouldn't be necessary! Please
 # don't change CLOBBER for WebIDL changes any more.
 
-Bug 1273625 - Update win32 rustc target to i686
+Bug 1271829 - Compile nss with SSE2 optimizations
--- a/config/external/nss/Makefile.in
+++ b/config/external/nss/Makefile.in
@@ -266,16 +266,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