Bug 1512462 - Only use nasm when explicitly requested. r=firefox-build-system-reviewers,mshal

This is needed because ffvpx does not build with nasm on win64.

Differential Revision: https://phabricator.services.mozilla.com/D13966

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Thomas Daede 2018-12-13 15:40:17 +00:00
parent 710d91063a
commit 427d23f3d7
3 changed files with 12 additions and 21 deletions

View File

@ -176,9 +176,9 @@ def have_nasm(value):
return True
@depends(nasm_asflags, yasm_asflags)
def have_yasm(nasm_asflags, yasm_asflags):
if nasm_asflags or yasm_asflags:
@depends(yasm_asflags)
def have_yasm(yasm_asflags):
if yasm_asflags:
return True
set_config('HAVE_NASM', have_nasm)

View File

@ -366,7 +366,7 @@ class AsmFlags(BaseCompileFlags):
debug_flags = []
if (self._context.config.substs.get('MOZ_DEBUG') or
self._context.config.substs.get('MOZ_DEBUG_SYMBOLS')):
if self._context.get('USE_NASM') or (self._context.get('USE_YASM') and self._context.config.substs.get('NASM')):
if self._context.get('USE_NASM'):
if (self._context.config.substs.get('OS_ARCH') == 'WINNT' and
not self._context.config.substs.get('GNU_CC')):
debug_flags += ['-F', 'cv8']

View File

@ -1323,23 +1323,14 @@ class TreeMetadataEmitter(LoggingMixin):
context.get('ASFLAGS'))
if context.get('USE_YASM') is True:
nasm = context.config.substs.get('NASM')
if nasm and nasm != ':':
# prefer using nasm to yasm
passthru.variables['AS'] = nasm
passthru.variables['AS_DASH_C_FLAG'] = ''
passthru.variables['ASOUTOPTION'] = '-o '
computed_as_flags.resolve_flags('OS',
context.config.substs.get('NASM_ASFLAGS', []))
else:
yasm = context.config.substs.get('YASM')
if not yasm:
raise SandboxValidationError('yasm is not available', context)
passthru.variables['AS'] = yasm
passthru.variables['AS_DASH_C_FLAG'] = ''
passthru.variables['ASOUTOPTION'] = '-o '
computed_as_flags.resolve_flags('OS',
context.config.substs.get('YASM_ASFLAGS', []))
yasm = context.config.substs.get('YASM')
if not yasm:
raise SandboxValidationError('yasm is not available', context)
passthru.variables['AS'] = yasm
passthru.variables['AS_DASH_C_FLAG'] = ''
passthru.variables['ASOUTOPTION'] = '-o '
computed_as_flags.resolve_flags('OS',
context.config.substs.get('YASM_ASFLAGS', []))
if context.get('USE_NASM') is True:
nasm = context.config.substs.get('NASM')