Bug 1403346 - Convert sse flags filtering in browser/app/Makefile.in to mozbuild. r=glandium
authorChris Manchester <cmanchester@mozilla.com>
Wed, 25 Oct 2017 15:12:10 -0700
changeset 388311 258a6a41c365e073f5e32b1834766db0c1a5e655
parent 388310 5f700fe50260b6ce9362506b02e1e5244b3c7686
child 388312 ffb3835d5f55a6f50cbd500ff2fb71987a75201b
push id32746
push useracraciun@mozilla.com
push dateThu, 26 Oct 2017 09:19:46 +0000
treeherdermozilla-central@485a03afaa23 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1403346
milestone58.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 1403346 - Convert sse flags filtering in browser/app/Makefile.in to mozbuild. r=glandium MozReview-Commit-ID: D10cPf6v0d2
browser/app/Makefile.in
browser/app/moz.build
--- a/browser/app/Makefile.in
+++ b/browser/app/Makefile.in
@@ -21,19 +21,17 @@ endif
 # shouldn't get 755 perms need $(IFLAGS1) for either way of calling nsinstall.
 NSDISTMODE = copy
 
 include $(topsrcdir)/config/config.mk
 
 # If we are trying to show an error dialog about the lack of SSE2 support,
 # make sure that code itself doesn't use SSE2.
 ifdef MOZ_LINUX_32_SSE2_STARTUP_ERROR
-CXXFLAGS := $(filter-out -march=% -msse -msse2 -mfpmath=sse,$(CXXFLAGS))
 CXX := $(filter-out -march=% -msse -msse2 -mfpmath=sse,$(CXX))
-CXXFLAGS += -mno-sse -mno-sse2 -mfpmath=387
 CXX += -march=pentiumpro
 endif
 
 ifeq ($(OS_ARCH),WINNT)
 # Rebuild firefox.exe if the manifest changes - it's included by splash.rc.
 # (this dependency should really be just for firefox.exe, not other targets)
 # Note the manifest file exists in the tree, so we use the explicit filename
 # here.
--- a/browser/app/moz.build
+++ b/browser/app/moz.build
@@ -112,12 +112,18 @@ if CONFIG['MOZ_LINKER']:
 if CONFIG['HAVE_CLOCK_MONOTONIC']:
     OS_LIBS += CONFIG['REALTIME_LIBS']
 
 if CONFIG['MOZ_GPSD']:
     DEFINES['MOZ_GPSD'] = True
 
 if CONFIG['MOZ_LINUX_32_SSE2_STARTUP_ERROR']:
     DEFINES['MOZ_LINUX_32_SSE2_STARTUP_ERROR'] = True
+    COMPILE_FLAGS['OS_CXXFLAGS'] = [
+        f for f in COMPILE_FLAGS.get('OS_CXXFLAGS', [])
+        if not f.startswith('-march=') and f not in ('-msse', '-msse2', '-mfpmath=sse')
+    ] + [
+        '-mno-sse', '-mno-sse2', '-mfpmath=387',
+    ]
 
 for icon in ('firefox', 'document', 'newwindow', 'newtab', 'pbmode'):
     DEFINES[icon.upper() + '_ICO'] = '"%s/%s/%s.ico"' % (
         TOPSRCDIR, CONFIG['MOZ_BRANDING_DIRECTORY'], icon)