Bug 1340637 - Skip geckodriver in hazard builds; r=ted

One of the Rust crates that is built as part of geckodriver's dependency
chain uses a build script to compile some C code.

Because mozbuild does not yet pass the compiler wrapper down to where
the gcc crate can find it, we need to avoid building on geckodriver when
this is the case.

When compiling the browser for the rooting hazard analysis build (labelled
H on Treeherder), the MOZ_HAZARD environment variable will be set and
available to moz.build descriptions.

MozReview-Commit-ID: GprFKtvXvOE

--HG--
extra : rebase_source : f45aa5d8c86673c8287371efcfa703755c2b2073
This commit is contained in:
Andreas Tolfsen 2017-05-23 14:59:58 +01:00
Родитель eda48cff40
Коммит e3554fa5ae
3 изменённых файлов: 11 добавлений и 3 удалений

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

@ -7,6 +7,8 @@
# with a script that invokes the real gcc with -fplugin and its configuration
# directives. Instead, duplicate the contents of that mozconfig here:
MOZ_HAZARD=1
MOZ_AUTOMATION_BUILD_SYMBOLS=0
MOZ_AUTOMATION_L10N_CHECK=0
MOZ_AUTOMATION_PACKAGE=0

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

@ -140,6 +140,9 @@ def sccache_verbose_stats(using_sccache, verbose_stats):
set_config('SCCACHE_VERBOSE_STATS', sccache_verbose_stats)
option(env='MOZ_HAZARD', help='Build for the GC rooting hazard analysis')
set_config('MOZ_HAZARD', depends_if('MOZ_HAZARD')(lambda _: True))
@depends('--with-compiler-wrapper', ccache)
@imports(_from='mozbuild.shellutil', _import='split', _as='shell_split')
def compiler_wrapper(wrapper, ccache):

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

@ -154,12 +154,15 @@ if CONFIG['ENABLE_MARIONETTE']:
'/testing/marionette',
]
# Disable building of geckodriver for artifcat builds and in
# environments where cross compiling occurs (macOS and Android).
# Disable building of geckodriver for artifact builds and in
# environments where cross compiling occurs (macOS and Android),
# and on hazard builds.
#
# https://bugzilla.mozilla.org/show_bug.cgi?id=1341041
# https://bugzilla.mozilla.org/show_bug.cgi?id=1329737
if CONFIG['COMPILE_ENVIRONMENT'] and not CONFIG['CROSS_COMPILE']:
if CONFIG['COMPILE_ENVIRONMENT'] and \
not CONFIG['CROSS_COMPILE'] and \
not CONFIG['MOZ_HAZARD']:
DIRS += ['/testing/geckodriver']
DIRS += [