Bug 1535845 - Move SeaMonkey sse check to moz.build. r=IanN a=IanN
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Sat, 30 Mar 2019 20:21:01 +0100
changeset 32152 f85f2cbb3c702e61710fc2fb0ffb8c1c242e3f9b
parent 32151 c7115248ceafc294a486999e1c7109e375f4625f
child 32153 b29b4d29e3074d026ecca57d30284d18f8bb69c3
push id180
push userfrgrahl@gmx.net
push dateSat, 30 Mar 2019 19:23:14 +0000
treeherdercomm-esr60@f85f2cbb3c70 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN, IanN
bugs1535845, 1403346
Bug 1535845 - Move SeaMonkey sse check to moz.build. r=IanN a=IanN Port Bug 1403346 part 14 [Move remaining compile flags from config.mk to moz.build computed flags].
suite/app/Makefile.in
suite/app/moz.build
--- a/suite/app/Makefile.in
+++ b/suite/app/Makefile.in
@@ -24,19 +24,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 seamonkey.exe if the manifest changes - it's included by splash.rc.
 # (this dependency should really be just for seamonkey.exe, not other targets)
 # Note the manifest file exists in the tree, so we use the explicit filename
 # here.
--- a/suite/app/moz.build
+++ b/suite/app/moz.build
@@ -60,15 +60,21 @@ if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_
 if CONFIG['OS_ARCH'] == 'WINNT' and CONFIG['CC_TYPE'] not in ('clang', 'gcc'):
     LDFLAGS += ['/HEAP:0x40000']
 
 if CONFIG['MOZ_LINKER']:
     OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
 
 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',
+    ]
 
 DEFINES['APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
 
 DisableStlWrapping()
 
 FINAL_TARGET_FILES.defaults += ['permissions']