Bug 1371016 - aom: Add /arch:AVX2 when compiling under msvc. r=ted

Propagate the libvpx AVX flag changes from bug 1279593.

This flag tells the compiler to generate AVX code
in these modules intead of using normal SSE instructions
which can trigger expensive state-switching.

NB: This should only be set for AVX-specific implementation
files; setting this flag for general code will invalidate
our runtime simd support checks.

MozReview-Commit-ID: 5BVeCTsNlup

--HG--
extra : rebase_source : 219b5912a220e960e45ec43a532f407fe18eb41b
This commit is contained in:
Ralph Giles 2017-06-07 12:34:31 -07:00
Родитель 97c2f0b514
Коммит 2ccddcb958
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -98,6 +98,13 @@ if CONFIG['CLANG_CL'] or not CONFIG['_MSC_VER']:
elif f.endswith('avx2.c'):
SOURCES[f].flags += ['-mavx2']
if CONFIG['_MSC_VER'] and not config['CLANG_CL']:
for f in SOURCES:
if f.endswith('avx.c'):
SOURCES[f].flags += ['-arch:AVX']
if f.endswith('avx2.c'):
SOURCES[f].flags += ['-arch:AVX2']
# Suppress warnings in third-party code.
if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
CFLAGS += [