Bug 1529194 - Allow to opt-in to widevine on aarch64 Windows. r=firefox-build-system-reviewers,chmanchester

This uses artifacts from a win32 build to get the necessary DLLs.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mike Hommey 2019-03-05 08:41:04 +00:00
Родитель 5f4d44a59c
Коммит e8b6f15845
6 изменённых файлов: 48 добавлений и 5 удалений

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

@ -170,6 +170,13 @@ endif
recurse_artifact:
$(topsrcdir)/mach --log-no-times artifact install$(if $(MOZ_ARTIFACT_BUILD_SYMBOLS), --symbols)$(if $(MOZ_AUTOMATION), --host-bins)
ifdef MOZ_EME_WIN32_ARTIFACT
recurse_win32-artifact:
rm -rf $(DIST)/i686
$(topsrcdir)/mach --log-no-times artifact install --job $(if $(MOZ_PGO),win32-pgo,win32-opt) --no-tests --distdir $(DIST)/i686
mv $(DIST)/i686/bin/* $(DIST)/i686
endif
ifdef MOZ_WIDGET_TOOLKIT
ifdef ENABLE_TESTS
# Additional makefile targets to call automated test suites

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

@ -56,6 +56,10 @@ ifdef MOZ_ARTIFACT_BUILDS
DEFINES += -DMOZ_ARTIFACT_BUILDS=1
endif
ifdef MOZ_EME_WIN32_ARTIFACT
DEFINES += -DMOZ_EME_WIN32_ARTIFACT=1
endif
DEFINES += -DJAREXT=
ifdef MOZ_ANGLE_RENDERER

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

@ -152,3 +152,7 @@ browser/defaults/settings/main/example.json
# Bug 1463748 - Fork and pref-off the new error pages
browser/chrome/browser/content/browser/aboutNetError-new.xhtml
browser/chrome/browser/content/browser/aboutNetError.xhtml
#ifdef MOZ_EME_WIN32_ARTIFACT
gmp-clearkey/0.1/manifest.json
i686/gmp-clearkey/0.1/manifest.json
#endif

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

@ -456,3 +456,18 @@ bin/libfreebl_32int64_3.so
#ifdef PKG_LOCALE_MANIFEST
#include @PKG_LOCALE_MANIFEST@
#endif
#ifdef MOZ_EME_WIN32_ARTIFACT
i686/plugin-container.exe
i686/xul.dll
i686/nss3.dll
i686/mozglue.dll
i686/lgpllibs.dll
i686/msvcp140.dll
i686/vcruntime140.dll
i686/gmp-clearkey/0.1/clearkey.dll
[eme destdir="i686"]
; We assume the file we generate locally is the same as what was in the win32
; build, which, practically speaking, is the case.
@BINPATH@/gmp-clearkey/0.1/manifest.json
#endif

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

@ -42,7 +42,7 @@ endif # WINNT
ifndef INCLUDED_AUTOCONF_MK
default::
else
TIERS := $(if $(MOZ_ARTIFACT_BUILDS),artifact )pre-export export $(if $(COMPILE_ENVIRONMENT),compile )misc libs tools$(if $(filter check recurse_check,$(MAKECMDGOALS)), check)
TIERS := $(if $(MOZ_ARTIFACT_BUILDS),artifact )$(if $(MOZ_EME_WIN32_ARTIFACT),win32-artifact )pre-export export $(if $(COMPILE_ENVIRONMENT),compile )misc libs tools$(if $(filter check recurse_check,$(MAKECMDGOALS)), check)
endif
# These defines are used to support the twin-topsrcdir model for comm-central.

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

@ -522,13 +522,17 @@ def eme_choices(target):
target.os not in ('Android', 'iOS') and
target.cpu in ('x86', 'x86_64')):
return ('widevine',)
if target.kernel == 'WINNT' and target.cpu == 'aarch64':
return ('widevine',)
# Widevine is enabled by default in desktop browser builds.
@depends(build_project, eme_choices)
def eme_default(build_project, choices):
# Widevine is enabled by default in desktop browser builds, except
# on aarch64 Windows.
@depends(build_project, eme_choices, target)
def eme_default(build_project, choices, target):
if build_project == 'browser':
return choices
if target.kernel != 'WINNT' or target.cpu != 'aarch64':
return choices
option('--enable-eme',
@ -555,6 +559,15 @@ def eme_modules(value):
# None.
set_config('MOZ_EME_MODULES', eme_modules | dependable([]))
@depends(eme_modules, target, when=eme_modules)
def eme_win32_artifact(modules, target):
if 'widevine' in modules and target.kernel == 'WINNT' and target.cpu == 'aarch64':
return True
set_config('MOZ_EME_WIN32_ARTIFACT', eme_win32_artifact)
option(name='--enable-chrome-format',
help='Select FORMAT of chrome files during packaging.',
nargs=1,