Bug 1529194 - Allow to opt-in to widevine on aarch64 Windows. r=firefox-build-system-reviewers,chmanchester
authorMike Hommey <mh+mozilla@glandium.org>
Tue, 05 Mar 2019 08:41:04 +0000
changeset 521784 430cc48e530f
parent 521783 000dfd4caca0
child 521785 15c16889e3b7
push id10867
push userdvarga@mozilla.com
push dateThu, 14 Mar 2019 15:20:45 +0000
treeherdermozilla-beta@abad13547875 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfirefox-build-system-reviewers, chmanchester
bugs1529194
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
Makefile.in
browser/installer/Makefile.in
browser/installer/allowed-dupes.mn
browser/installer/package-manifest.in
config/baseconfig.mk
toolkit/moz.configure
--- a/Makefile.in
+++ b/Makefile.in
@@ -165,16 +165,23 @@ endif
 
 # Host binaries are not produced for macOS consumers: that is, there's
 # no macOS-hosted job to produce them at this time.  Therefore we
 # enable --host-bins only for automation builds, which only require Linux and
 # Windows host binaries.
 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
 include $(topsrcdir)/testing/testsuite-targets.mk
 endif
 endif
 
 default all::
--- a/browser/installer/Makefile.in
+++ b/browser/installer/Makefile.in
@@ -51,16 +51,20 @@ endif
 ifdef NSS_DISABLE_DBM
 DEFINES += -DNSS_DISABLE_DBM=1
 endif
 
 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
 DEFINES += -DMOZ_ANGLE_RENDERER=$(MOZ_ANGLE_RENDERER)
 ifdef MOZ_D3DCOMPILER_VISTA_DLL
 DEFINES += -DMOZ_D3DCOMPILER_VISTA_DLL=$(MOZ_D3DCOMPILER_VISTA_DLL)
 endif
 endif
--- a/browser/installer/allowed-dupes.mn
+++ b/browser/installer/allowed-dupes.mn
@@ -147,8 +147,12 @@ browser/chrome/browser/res/payments/form
 browser/features/formautofill@mozilla.org/chrome/content/autofillEditForms.js
 browser/chrome/browser/res/payments/formautofill/autofillEditForms.js
 # Bug 1451050 - Remote settings empty dumps (will be populated with data eventually)
 browser/defaults/settings/pinning/pins.json
 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
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -451,8 +451,23 @@ bin/libfreebl_32int64_3.so
 #ifdef XP_LINUX
 @RESPATH@/fix_linux_stack.py
 #endif
 #endif
 
 #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
--- a/config/baseconfig.mk
+++ b/config/baseconfig.mk
@@ -37,17 +37,17 @@ ifeq (a,$(firstword a$(subst /, ,$(srcdi
 $(error MSYS-style srcdir are not supported for Windows builds.)
 endif
 endif
 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.
 ifdef MOZILLA_SRCDIR
   MOZILLA_DIR = $(MOZILLA_SRCDIR)
 else
   MOZILLA_DIR = $(topsrcdir)
 endif
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -517,23 +517,27 @@ set_define('MOZ_OMX', openmax)
 # EME Support
 # ==============================================================
 @depends(target)
 def eme_choices(target):
     if (target.kernel in ('Darwin', 'WINNT', 'Linux') and
         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',
        nargs='+',
        choices=eme_choices,
        default=eme_default,
        when=eme_choices,
        help='{Enable|Disable} support for Encrypted Media Extensions')
@@ -550,16 +554,25 @@ def eme(enabled, fmp4):
 def eme_modules(value):
     return value
 
 
 # Fallback to an empty list when eme_choices is empty, setting eme_modules to
 # 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,
        choices=('omni', 'jar', 'flat'),
        default='omni')
 
 @depends('--enable-chrome-format')
 def packager_format(value):