Bug 1403346 - Convert sse flags filtering in browser/app/Makefile.in to mozbuild.
MozReview-Commit-ID: D10cPf6v0d2
--- 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)