Bug 1413257: Allow disabling ffvpx's AVX2 support on linux64 for Thunderbird's buildbot; r=jya,rillian

MozReview-Commit-ID: 6USzO1GE7dJ

--HG--
extra : rebase_source : 4a25c5e7c1cbe7bb063f615accf6563333c48c9c
This commit is contained in:
Tom Prince 2017-10-31 12:42:27 -06:00
Родитель eab43e4a6c
Коммит e1f007efbe
3 изменённых файлов: 32 добавлений и 0 удалений

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

@ -57,6 +57,18 @@ def yasm_version(yasm):
return Version(version)
@depends(yasm_version)
def yasm_major_version(yasm_version):
return str(yasm_version.major)
@depends(yasm_version)
def yasm_minor_version(yasm_version):
return str(yasm_version.minor)
set_config('YASM_MAJOR_VERSION', yasm_major_version)
set_config('YASM_MINOR_VERSION', yasm_minor_version)
# Until we move all the yasm consumers out of old-configure.
# bug 1257904
add_old_configure_assignment('_YASM_MAJOR_VERSION',

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

@ -1,4 +1,14 @@
#ifndef MOZ_FFVPX_CONFIG_COMMON_H
#define MOZ_FFVPX_CONFIG_COMMON_H
#include "defaults_disabled.h"
#ifdef YASM_MISSING_AVX2
#undef HAVE_AVX2
#undef HAVE_AVX2_INTERNAL
#undef HAVE_AVX2_EXTERNAL
#define HAVE_AVX2 0
#define HAVE_AVX2_INTERNAL 0
#define HAVE_AVX2_EXTERNAL 0
#endif
#endif

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

@ -10,6 +10,7 @@ ASFLAGS += ['-I%s/media/ffvpx' % TOPSRCDIR]
if CONFIG['FFVPX_ASFLAGS']:
USE_YASM = True
if CONFIG['OS_ARCH'] == 'WINNT':
# Fix inline symbols and math defines for windows.
DEFINES['_USE_MATH_DEFINES'] = True
@ -32,6 +33,15 @@ if CONFIG['FFVPX_ASFLAGS']:
# default disabled components
ASFLAGS += ['-Pdefaults_disabled.asm']
if int(CONFIG['YASM_MAJOR_VERSION']) == 1 and int(CONFIG['YASM_MINOR_VERSION']) < 2:
DEFINES['YASM_MISSING_AVX2'] = True
ASFLAGS += [
'-DHAVE_AVX2=0',
'-DHAVE_AVX2_INTERNAL=0',
'-DHAVE_AVX2_EXTERNAL=0',
]
LOCAL_INCLUDES += ['/media/ffvpx']
# We allow warnings for third-party code that can be updated from upstream.