Skip to content

Commit

Permalink
Bug 1529194 - Allow to opt-in to widevine on aarch64 Windows. r=firef…
Browse files Browse the repository at this point in the history
…ox-build-system-reviewers,chmanchester

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

Differential Revision: https://phabricator.services.mozilla.com/D20597
  • Loading branch information
glandium committed Mar 5, 2019
1 parent 6656204 commit 859ed73
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 5 deletions.
7 changes: 7 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions browser/installer/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions browser/installer/allowed-dupes.mn
Original file line number Diff line number Diff line change
Expand Up @@ -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
15 changes: 15 additions & 0 deletions browser/installer/package-manifest.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion config/baseconfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
21 changes: 17 additions & 4 deletions toolkit/moz.configure
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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,
Expand Down

0 comments on commit 859ed73

Please sign in to comment.