Bug 1651305 - Simplify how USE_INTEGRATED_CLANGCL_AS is handled. r=froydnj

The current setup sets /some/ flags via CLANGCL_ASFLAGS (handling of x86
is notably missing, for instance), and uses "clang-cl" as the assembler,
assuming it's in $PATH.

This can be simplified by just using `CC`, which will contain the full
path to "clang-cl" and the right flags for the targets, which makes
CLANGCL_ASFLAGS unnecessary.

Differential Revision: https://phabricator.services.mozilla.com/D82660
This commit is contained in:
Mike Hommey 2020-07-08 13:53:27 +00:00
Родитель 5f385df474
Коммит e65481e7fb
2 изменённых файлов: 2 добавлений и 18 удалений

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

@ -1784,19 +1784,6 @@ set_config('HAVE_YASM', have_yasm)
add_old_configure_assignment('YASM', have_yasm)
# clang-cl integrated assembler support
# ==============================================================
@depends(target)
def clangcl_asflags(target):
asflags = None
if target.os == 'WINNT' and target.cpu == 'aarch64':
asflags = ['--target=aarch64-windows-msvc']
return asflags
set_config('CLANGCL_ASFLAGS', clangcl_asflags)
# Code Coverage
# ==============================================================

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

@ -1411,14 +1411,11 @@ class TreeMetadataEmitter(LoggingMixin):
context.config.substs.get('NASM_ASFLAGS', []))
if context.get('USE_INTEGRATED_CLANGCL_AS') is True:
clangcl = context.config.substs.get('CLANG_CL')
if not clangcl:
if context.config.substs.get('CC_TYPE') != 'clang-cl':
raise SandboxValidationError('clang-cl is not available', context)
passthru.variables['AS'] = 'clang-cl'
passthru.variables['AS'] = context.config.substs.get('CC')
passthru.variables['AS_DASH_C_FLAG'] = '-c'
passthru.variables['ASOUTOPTION'] = '-o '
computed_as_flags.resolve_flags('OS',
context.config.substs.get('CLANGCL_ASFLAGS', []))
if passthru.variables:
yield passthru