Bug 1543323 - On Android, only build gtest tests archive on x86_64 builds; r=glandium

We only plan to run Android gtest in continuous integration on x86_64.
Given the impact on build times, I think it best to limit the gtest archive
builds to the variants where we will use it.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Geoff Brown 2019-04-12 00:17:45 +00:00
parent 6f7945508b
commit 895b4a76e6

View File

@ -320,15 +320,16 @@ option('--disable-gtest-in-build',
when='--enable-compile-environment')
# Determine whether to build the gtest xul. This happens in automation
# on Android and Desktop platforms with the exception of Windows PGO, where
# linking xul-gtest.dll takes too long.
# on Android and Desktop platforms with the exception of:
# - Windows PGO, where linking xul-gtest.dll takes too long;
# - Android other than x86_64, where gtest is not required.
@depends('MOZ_PGO', build_project, target, 'MOZ_AUTOMATION', '--disable-gtest-in-build',
enable_tests, when='--enable-compile-environment')
def build_gtest(pgo, build_project, target, automation, enabled, enable_tests):
if not enable_tests or not enabled:
return None
if (automation and build_project in ('browser', 'mobile/android') and
not (pgo and target.os == 'WINNT')):
not ((pgo and target.os == 'WINNT') or (target.os == 'Android' and target.cpu != 'x86_64'))):
return True
set_config('LINK_GTEST_DURING_COMPILE', build_gtest)