зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1515210 - Build openh264 plugin for win64-aarch64; r=Callek
Differential Revision: https://phabricator.services.mozilla.com/D21782 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
cc644618dc
Коммит
227713d452
|
@ -130,6 +130,26 @@ jobs:
|
|||
- openh264/win64.py
|
||||
toolchains:
|
||||
- win64-clang-cl
|
||||
win64-aarch64/opt:
|
||||
attributes:
|
||||
build_platform: windows2012-aarch64
|
||||
build_type: opt
|
||||
treeherder:
|
||||
platform: win64-aarch64/opt
|
||||
worker-type: aws-provisioner-v1/gecko-{level}-b-win2012
|
||||
worker:
|
||||
max-run-time: 1800
|
||||
artifacts:
|
||||
- name: private/openh264
|
||||
path: build/openh264/artifacts
|
||||
type: directory
|
||||
run:
|
||||
using: mozharness
|
||||
script: mozharness/scripts/openh264_build.py
|
||||
config:
|
||||
- openh264/win64-aarch64.py
|
||||
toolchains:
|
||||
- win64-clang-cl
|
||||
android-api-16/opt:
|
||||
attributes:
|
||||
build_platform: android-arm
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
[
|
||||
{
|
||||
"size": 56832,
|
||||
"visibility": "public",
|
||||
"digest": "01e6bd936ef008061b95a94008682869ebf2a29d1c035e49cd6579b1a020d0d195431221577f127eb52b97137337efe30e6de6c5a2f4b6a87ff2a990e9874e8e",
|
||||
"algorithm": "sha512",
|
||||
"filename": "dump_syms.exe"
|
||||
},
|
||||
{
|
||||
"version": "Visual Studio 2017 15.9.6 / SDK 10.0.17134.0",
|
||||
"size": 490015895,
|
||||
"visibility": "internal",
|
||||
"digest": "91d08703a8ce39f6f53ccecc7c7b6f57e1b571ddb5d1eb4dd9260e52580566c35a4bed39ad366fd60ca60ebf5c06f0f00561bba5cd631826511f2872a3d2dcd5",
|
||||
"algorithm": "sha512",
|
||||
"filename": "vs2017_15.9.6.zip",
|
||||
"unpack": true
|
||||
}
|
||||
]
|
|
@ -0,0 +1,46 @@
|
|||
import sys
|
||||
import os
|
||||
|
||||
import mozharness
|
||||
|
||||
external_tools_path = os.path.join(
|
||||
os.path.abspath(os.path.dirname(os.path.dirname(mozharness.__file__))),
|
||||
'external_tools',
|
||||
)
|
||||
|
||||
VSPATH = '%(abs_work_dir)s\\src\\vs2017_15.9.6'
|
||||
config = {
|
||||
'tooltool_manifest_file': 'win64-aarch64.manifest',
|
||||
'exes': {
|
||||
'gittool.py': [sys.executable, os.path.join(external_tools_path, 'gittool.py')],
|
||||
'python2.7': 'c:\\mozilla-build\\python\\python.exe',
|
||||
},
|
||||
'dump_syms_binary': 'dump_syms.exe',
|
||||
'arch': 'aarch64',
|
||||
'use_yasm': False,
|
||||
'partial_env': {
|
||||
'PATH': ('%(abs_work_dir)s\\openh264;'
|
||||
'%(abs_work_dir)s\\src\\clang\\bin\\;'
|
||||
'{_VSPATH}\\VC\\bin\\Hostx64\\arm64;'
|
||||
'{_VSPATH}\\VC\\bin\\Hostx64\\x64;'
|
||||
# 32-bit redist here for our dump_syms.exe
|
||||
'{_VSPATH}/VC/redist/x86/Microsoft.VC141.CRT;'
|
||||
'{_VSPATH}/SDK/Redist/ucrt/DLLs/x86;'
|
||||
'{_VSPATH}/DIA SDK/bin;%(PATH)s;'
|
||||
).format(_VSPATH=VSPATH),
|
||||
'INCLUDES': (
|
||||
'-I{_VSPATH}\\VC\\include '
|
||||
'-I{_VSPATH}\\VC\\atlmfc\\include '
|
||||
'-I{_VSPATH}\\SDK\\Include\\10.0.17134.0\\ucrt '
|
||||
'-I{_VSPATH}\\SDK\\Include\\10.0.17134.0\\shared '
|
||||
'-I{_VSPATH}\\SDK\\Include\\10.0.17134.0\\um '
|
||||
'-I{_VSPATH}\\SDK\\Include\\10.0.17134.0\\winrt '
|
||||
).format(_VSPATH=VSPATH),
|
||||
'LIB': (
|
||||
'{_VSPATH}/VC/lib/arm64;'
|
||||
'{_VSPATH}/VC/atlmfc/lib/arm64;'
|
||||
'{_VSPATH}/SDK/lib/10.0.17134.0/ucrt/arm64;'
|
||||
'{_VSPATH}/SDK/lib/10.0.17134.0/um/arm64;'
|
||||
).format(_VSPATH=VSPATH),
|
||||
},
|
||||
}
|
|
@ -149,7 +149,7 @@ class OpenH264Build(TransferMixin, VCSScript, TooltoolMixin):
|
|||
self.error('missing a required key.')
|
||||
|
||||
def query_package_name(self):
|
||||
if self.config['arch'] == "x64":
|
||||
if self.config['arch'] == 'x64':
|
||||
bits = '64'
|
||||
else:
|
||||
bits = '32'
|
||||
|
@ -164,10 +164,13 @@ class OpenH264Build(TransferMixin, VCSScript, TooltoolMixin):
|
|||
version=version, bits=bits)
|
||||
else:
|
||||
return 'openh264-linux{bits}-{version}.zip'.format(version=version, bits=bits)
|
||||
elif sys.platform == 'darwin':
|
||||
return 'openh264-macosx{bits}-{version}.zip'.format(version=version, bits=bits)
|
||||
elif sys.platform == 'win32':
|
||||
return 'openh264-win{bits}-{version}.zip'.format(version=version, bits=bits)
|
||||
if self.config['arch'] == 'aarch64':
|
||||
return 'openh264-win64-aarch64-{version}.zip'.format(
|
||||
version=version)
|
||||
else:
|
||||
return 'openh264-win{bits}-{version}.zip'.format(
|
||||
version=version, bits=bits)
|
||||
self.fatal("can't determine platform")
|
||||
|
||||
def query_make_params(self):
|
||||
|
@ -210,6 +213,10 @@ class OpenH264Build(TransferMixin, VCSScript, TooltoolMixin):
|
|||
if self.config['arch'] == 'x86':
|
||||
retval.append("ARCH=x86")
|
||||
retval.append("CFLAGS=-m32")
|
||||
elif self.config['arch'] == 'aarch64':
|
||||
retval.append("ARCH=arm64")
|
||||
retval.append("CFLAGS=--target=aarch64-windows-msvc")
|
||||
retval.append("CXX_LINK_O=-nologo --target=aarch64-windows-msvc -Fe$@")
|
||||
else:
|
||||
retval.append("ARCH=x86_64")
|
||||
else:
|
||||
|
@ -263,6 +270,24 @@ class OpenH264Build(TransferMixin, VCSScript, TooltoolMixin):
|
|||
self.copytree(os.path.join(dirs['abs_work_dir'], 'src', 'dom',
|
||||
'media', 'gmp', 'gmp-api'),
|
||||
os.path.join(repo_dir, 'gmp-api'))
|
||||
|
||||
# We need gas-preprocessor.pl for arm64 builds
|
||||
if self.config['arch'] == 'aarch64':
|
||||
openh264_dir = os.path.join(dirs['abs_work_dir'], 'openh264')
|
||||
self.download_file(('https://raw.githubusercontent.com/libav/'
|
||||
'gas-preprocessor/c2bc63c96678d9739509e58'
|
||||
'7aa30c94bdc0e636d/gas-preprocessor.pl'),
|
||||
parent_dir=openh264_dir)
|
||||
self.chmod(os.path.join(openh264_dir, 'gas-preprocessor.pl'),
|
||||
744)
|
||||
|
||||
# gas-preprocessor.pl expects cpp to exist
|
||||
# os.symlink is not available on Windows until we switch to
|
||||
# Python 3.
|
||||
os.system('ln -s %s %s' % (
|
||||
os.path.join(dirs['abs_work_dir'], 'src', 'clang',
|
||||
'bin', 'clang.exe'),
|
||||
os.path.join(openh264_dir, 'cpp')))
|
||||
return 0
|
||||
|
||||
repos = [
|
||||
|
|
Загрузка…
Ссылка в новой задаче