Bug 1652068: Log mozbuild prioritization on configure path r=firefox-build-system-reviewers,rstewart

The order in which toolchain binaries are resolved change based on environmental factors,
such as whether Firefox is being built in release mode or not.

An informative log was added in either case.

Differential Revision: https://phabricator.services.mozilla.com/D84439
This commit is contained in:
Mitchell Hentges 2020-07-28 20:50:03 +00:00
Родитель 2c33b47941
Коммит 816b6c3b73
1 изменённых файлов: 18 добавлений и 8 удалений

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

@ -688,16 +688,17 @@ def original_path():
@template
def toolchain_search_path_for(host_or_target):
vc_path = {
host: host_vc_compiler_path,
target: vc_compiler_path,
arch_alias, vc_path = {
host: ('host', host_vc_compiler_path),
target: ('target', vc_compiler_path),
}[host_or_target]
@depends(vc_path, original_path, developer_options, mozbuild_state_path)
@depends(dependable(arch_alias), vc_path, original_path, developer_options,
mozbuild_state_path)
@imports('os')
@imports(_from='os', _import='environ')
def toolchain_search_path(vc_compiler_path, original_path, developer_options,
mozbuild_state_path):
def toolchain_search_path(arch_alias, vc_compiler_path, original_path,
developer_options, mozbuild_state_path):
result = list(original_path)
if vc_compiler_path:
@ -725,8 +726,17 @@ def toolchain_search_path_for(host_or_target):
result.append(rustup_path)
if developer_options:
return bootstrapped + result
return result + bootstrapped
log.debug('Prioritizing mozbuild state dir in {} toolchain path because '
'you are not building in release mode.'.format(arch_alias))
search_path = bootstrapped + result
else:
log.debug('Prioritizing system over mozbuild state dir in {} '
'toolchain path because you are building in '
'release mode.'.format(arch_alias))
search_path = result + bootstrapped
log.debug('Search path for {} toolchain: {}'.format(arch_alias, search_path))
return search_path
return toolchain_search_path