Bug 1298569 - Part 2. Replace -fpu=neon with CONFIG['NEON_FLAGS']. r=glandium
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Wed, 14 Sep 2016 18:34:19 +0900
changeset 355319 90ae9a8843ec7ddcf88eaa3c626ae705492f5609
parent 355318 3356000cec59f979f5d4aa384854343a8d184484
child 355320 6e355b66362685b8ff16f6cec365b359d4db3dab
push id6570
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:26:13 +0000
treeherdermozilla-beta@f455459b2ae5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1298569
milestone51.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 1298569 - Part 2. Replace -fpu=neon with CONFIG['NEON_FLAGS']. r=glandium Use CONFIG['NEON_FLAGS'] on moz.build instead. MozReview-Commit-ID: F6R532Hi5mg
dom/media/webaudio/moz.build
gfx/2d/moz.build
gfx/cairo/libpixman/src/moz.build
gfx/skia/generate_mozbuild.py
gfx/skia/moz.build
layout/svg/moz.build
media/libopus/moz.build
media/libspeex_resampler/src/moz.build
media/libtheora/moz.build
--- a/dom/media/webaudio/moz.build
+++ b/dom/media/webaudio/moz.build
@@ -112,17 +112,17 @@ UNIFIED_SOURCES += [
     'StereoPannerNode.cpp',
     'ThreeDPoint.cpp',
     'WaveShaperNode.cpp',
     'WebAudioUtils.cpp',
 ]
 
 if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['BUILD_ARM_NEON']:
     SOURCES += ['AudioNodeEngineNEON.cpp']
-    SOURCES['AudioNodeEngineNEON.cpp'].flags += ['-mfpu=neon']
+    SOURCES['AudioNodeEngineNEON.cpp'].flags += CONFIG['NEON_FLAGS']
     LOCAL_INCLUDES += [
         '/media/openmax_dl/dl/api/'
     ]
 
 # Are we targeting x86 or x64?  If so, build SSE2 files.
 if CONFIG['INTEL_ARCHITECTURE']:
     SOURCES += ['AudioNodeEngineSSE2.cpp']
     DEFINES['USE_SSE2'] = True
--- a/gfx/2d/moz.build
+++ b/gfx/2d/moz.build
@@ -194,17 +194,17 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'coco
     ]
     SOURCES += [
         'MacIOSurface.cpp',
         'QuartzSupport.mm',
     ]
 
 if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['BUILD_ARM_NEON']:
     SOURCES += ['BlurNEON.cpp']
-    SOURCES['BlurNEON.cpp'].flags += ['-mfpu=neon']
+    SOURCES['BlurNEON.cpp'].flags += CONFIG['NEON_FLAGS']
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 for var in ('USE_CAIRO', 'MOZ2D_HAS_MOZ_CAIRO'):
     DEFINES[var] = True
 
--- a/gfx/cairo/libpixman/src/moz.build
+++ b/gfx/cairo/libpixman/src/moz.build
@@ -132,17 +132,17 @@ if use_vmx:
 
 if use_arm_simd_gcc:
     DEFINES['USE_ARM_SIMD'] = True
     SOURCES += ['pixman-arm-simd.c']
 
 if use_arm_neon_gcc:
     DEFINES['USE_ARM_NEON'] = True
     SOURCES += ['pixman-arm-neon.c']
-    SOURCES['pixman-arm-neon.c'].flags += ['-mfpu=neon']
+    SOURCES['pixman-arm-neon.c'].flags += CONFIG['NEON_FLAGS']
 
 # Suppress warnings in third-party code.
 if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
     CFLAGS += [
         '-Wno-address',
         '-Wno-missing-field-initializers',
         '-Wno-sign-compare',
         '-Wno-unused',                      # too many unused warnings; ignore
--- a/gfx/skia/generate_mozbuild.py
+++ b/gfx/skia/generate_mozbuild.py
@@ -321,17 +321,17 @@ def write_cflags(f, values, subsearch, c
   val_list = uniq(sorted(values, key=lambda x: x.lower()))
 
   if len(val_list) == 0:
     return
 
   for val in val_list:
     if val.find(subsearch) > 0:
       write_indent(indent)
-      f.write("SOURCES[\'" + val + "\'].flags += [\'" + cflag + "\']\n")
+      f.write("SOURCES[\'" + val + "\'].flags += " + cflag + "\n")
 
 def write_sources(f, values, indent):
 
   # Unfortunately for now the gpu and pathops directories are
   # non-unifiable. Keep track of this and fix it.
   unified_blacklist = [
     '_SSE',
     '_SSSE',
@@ -429,17 +429,17 @@ def write_mozbuild(sources):
   f.write("if CONFIG['INTEL_ARCHITECTURE']:\n")
   write_sources(f, sources['intel'], 4)
 
   f.write("elif CONFIG['CPU_ARCH'] == 'arm' and CONFIG['GNU_CC']:\n")
   write_sources(f, sources['arm'], 4)
 
   f.write("    if CONFIG['BUILD_ARM_NEON']:\n")
   write_list(f, 'SOURCES', sources['neon'], 8)
-  write_cflags(f, sources['neon'], 'neon', '-mfpu=neon', 8)
+  write_cflags(f, sources['neon'], 'neon', "CONFIG['NEON_FLAGS']", 8)
 
   f.write("else:\n")
   write_sources(f, sources['none'], 4)
 
   f.write(footer)
 
   f.close()
 
--- a/gfx/skia/moz.build
+++ b/gfx/skia/moz.build
@@ -531,21 +531,21 @@ elif CONFIG['CPU_ARCH'] == 'arm' and CON
     if CONFIG['BUILD_ARM_NEON']:
         SOURCES += [
             'skia/src/opts/SkBitmapProcState_arm_neon.cpp',
             'skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp',
             'skia/src/opts/SkBlitMask_opts_arm_neon.cpp',
             'skia/src/opts/SkBlitRow_opts_arm_neon.cpp',
             'skia/src/opts/SkOpts_neon.cpp',
         ]
-        SOURCES['skia/src/opts/SkBitmapProcState_arm_neon.cpp'].flags += ['-mfpu=neon']
-        SOURCES['skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp'].flags += ['-mfpu=neon']
-        SOURCES['skia/src/opts/SkBlitMask_opts_arm_neon.cpp'].flags += ['-mfpu=neon']
-        SOURCES['skia/src/opts/SkBlitRow_opts_arm_neon.cpp'].flags += ['-mfpu=neon']
-        SOURCES['skia/src/opts/SkOpts_neon.cpp'].flags += ['-mfpu=neon']
+        SOURCES['skia/src/opts/SkBitmapProcState_arm_neon.cpp'].flags += CONFIG['NEON_FLAGS']
+        SOURCES['skia/src/opts/SkBitmapProcState_matrixProcs_neon.cpp'].flags += CONFIG['NEON_FLAGS']
+        SOURCES['skia/src/opts/SkBlitMask_opts_arm_neon.cpp'].flags += CONFIG['NEON_FLAGS']
+        SOURCES['skia/src/opts/SkBlitRow_opts_arm_neon.cpp'].flags += CONFIG['NEON_FLAGS']
+        SOURCES['skia/src/opts/SkOpts_neon.cpp'].flags += CONFIG['NEON_FLAGS']
 else:
     UNIFIED_SOURCES += [
         'skia/src/opts/SkBitmapProcState_opts_none.cpp',
         'skia/src/opts/SkBlitMask_opts_none.cpp',
         'skia/src/opts/SkBlitRow_opts_none.cpp',
     ]
 
 
--- a/layout/svg/moz.build
+++ b/layout/svg/moz.build
@@ -53,17 +53,17 @@ UNIFIED_SOURCES += [
     'SVGFELeafFrame.cpp',
     'SVGFEUnstyledLeafFrame.cpp',
     'SVGTextFrame.cpp',
     'SVGViewFrame.cpp',
 ]
 
 if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['BUILD_ARM_NEON']:
     SOURCES += ['nsSVGMaskFrameNEON.cpp']
-    SOURCES['nsSVGMaskFrameNEON.cpp'].flags += ['-mfpu=neon']
+    SOURCES['nsSVGMaskFrameNEON.cpp'].flags += CONFIG['NEON_FLAGS']
 
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '../../widget',
     '../base',
     '../generic',
     '../style',
     '../xul',
--- a/media/libopus/moz.build
+++ b/media/libopus/moz.build
@@ -100,15 +100,15 @@ if CONFIG['CPU_ARCH'] == 'arm' and CONFI
         ]
         CXXFLAGS += [
             '-O3',
         ]
     # These flags are a lie; they're just used to enable the requisite
     # opcodes; actual arch detection is done at runtime.
     ASFLAGS += [
         '-march=armv7-a',
-        '-mfpu=neon',
     ]
+    ASFLAGS += CONFIG['NEON_FLAGS']
 
 # Suppress warnings in third-party code.
 if CONFIG['GNU_CC']:
     if CONFIG['CLANG_CXX']:
         CFLAGS += ['-Wno-#pragma-messages']
--- a/media/libspeex_resampler/src/moz.build
+++ b/media/libspeex_resampler/src/moz.build
@@ -39,13 +39,13 @@ if CONFIG['INTEL_ARCHITECTURE'] and not 
     ]
     SOURCES['resample_sse.c'].flags += CONFIG['SSE2_FLAGS']
 
 if CONFIG['CPU_ARCH'] == 'arm' and CONFIG['BUILD_ARM_NEON']:
     DEFINES['_USE_NEON'] = True
     SOURCES += [
         'resample_neon.c'
     ]
-    SOURCES['resample_neon.c'].flags += ['-mfpu=neon']
+    SOURCES['resample_neon.c'].flags += CONFIG['NEON_FLAGS']
 
 # Suppress warnings in third-party code.
 if CONFIG['GNU_CC']:
     CFLAGS += ['-Wno-sign-compare']
--- a/media/libtheora/moz.build
+++ b/media/libtheora/moz.build
@@ -97,15 +97,15 @@ if CONFIG['GNU_AS']:
             'armidct-gnu',
             'armloop-gnu',
         ]]
 
         # These flags are a lie; they're just used to enable the requisite
         # opcodes; actual arch detection is done at runtime.
         ASFLAGS += [
             '-march=armv7-a',
-            '-mfpu=neon',
         ]
+        ASFLAGS += CONFIG['NEON_FLAGS']
 
         if CONFIG['CLANG_CXX']:
             ASFLAGS += [
                 '-no-integrated-as',
             ]