Bug 1279593 - Add /arch:AVX or /arch:AVX2 to compile some files under media/libvpx. r=ted.mielczarek
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Tue, 06 Jun 2017 20:31:34 +0900
changeset 413341 858813bdc9b43c07d48d55fc85801c0b0a65144c
parent 413340 0d25a6e63f799309f2c56f86ca4c4dc42e85ee3a
child 413342 378499da20301b4d3952a5068f4a1422cad45ef4
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1279593
milestone55.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 1279593 - Add /arch:AVX or /arch:AVX2 to compile some files under media/libvpx. r=ted.mielczarek MozReview-Commit-ID: CDXWpG4058E
media/libvpx/moz.build
--- a/media/libvpx/moz.build
+++ b/media/libvpx/moz.build
@@ -100,16 +100,24 @@ if CONFIG['CLANG_CL'] or not CONFIG['_MS
                 SOURCES[f].flags += ['-mssse3']
             if 'sse4.c' in f:
                 SOURCES[f].flags += ['-msse4.1']
             if 'avx.c' in f:
                 SOURCES[f].flags += ['-mavx']
             if 'avx2.c' in f:
                 SOURCES[f].flags += ['-mavx2']
 
+if CONFIG['_MSC_VER'] and not CONFIG['CLANG_CL']:
+    for f in SOURCES:
+        if f.endswith('.c'):
+            if 'avx.c' in f:
+                SOURCES[f].flags += ['-arch:AVX']
+            if 'avx2.c' in f:
+                SOURCES[f].flags += ['-arch:AVX2']
+
 # Suppress warnings in third-party code.
 if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
     CFLAGS += [
         '-Wno-sign-compare',
         '-Wno-unused-function', # so many of these warnings; just ignore them
     ]
 if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
     CFLAGS += [