Bug 1658040 - Part 3: Allow `mach build` with `--disable-compile-environment`. r=froydnj

Builds without a compilation environment don't produce
`libxul_so.list`, and therefore this `GeneratedFile` can't depend on
it.  But this `GeneratedFile` only makes sense for compilation, so we
just make it conditional.

Depends on D87332

Differential Revision: https://phabricator.services.mozilla.com/D87333
This commit is contained in:
Nick Alexander 2020-08-18 17:07:50 +00:00
Родитель 9c623dbc86
Коммит 6e08086c28
1 изменённых файлов: 10 добавлений и 8 удалений

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

@ -364,11 +364,13 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
# buildid hard coded in it. Then we make that source file depend on all the
# objects files that constitute libxul, so that if any of the files linked into
# libxul is rebuilt, we refresh the buildid and link it into libxul.
SOURCES += ['!buildid.cpp']
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('cocoa', 'uikit'):
libxul_list = 'XUL'
else:
libxul_list = '%sxul_%s' % (
CONFIG['DLL_PREFIX'], CONFIG['DLL_SUFFIX'].lstrip('.').replace('.','_'))
GeneratedFile('buildid.cpp', script = 'gen_buildid.py',
inputs=['!build/%s.list' % libxul_list])
if CONFIG['COMPILE_ENVIRONMENT']:
SOURCES += ['!buildid.cpp']
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('cocoa', 'uikit'):
libxul_list = 'XUL'
else:
libxul_list = '%sxul_%s' % (
CONFIG['DLL_PREFIX'], CONFIG['DLL_SUFFIX'].lstrip('.').replace('.','_'))
GeneratedFile('buildid.cpp', script = 'gen_buildid.py',
inputs=['!build/%s.list' % libxul_list])