[fuchsia] Add arm64 builds for flutter and dart runner (flutter/engine#10260)
This commit is contained in:
2
DEPS
2
DEPS
@@ -136,7 +136,7 @@ allowed_hosts = [
|
||||
]
|
||||
|
||||
deps = {
|
||||
'src': 'https://github.com/flutter/buildroot.git' + '@' + 'de2a399cf6fbc24c2fa5dc7e93dabde5c436cfb3',
|
||||
'src': 'https://github.com/flutter/buildroot.git' + '@' + '87840fd4ac6974537339969486acdbf9613b3c9e',
|
||||
|
||||
# Fuchsia compatibility
|
||||
#
|
||||
|
||||
@@ -105,11 +105,11 @@ task:
|
||||
build_script: |
|
||||
cd $ENGINE_PATH/src/flutter
|
||||
./ci/build.sh
|
||||
- name: build_fuchsia_unopt_profile
|
||||
- name: build_fuchsia_unopt_profile_x64
|
||||
compile_host_script: |
|
||||
cd $ENGINE_PATH/src
|
||||
./flutter/tools/gn --runtime-mode profile --fuchsia --no-lto --unopt
|
||||
ninja -C out/fuchsia_profile_unopt
|
||||
ninja -C out/fuchsia_profile_unopt_x64
|
||||
|
||||
# WINDOWS
|
||||
task:
|
||||
|
||||
@@ -131,12 +131,11 @@ def CopyToBucket(src, dst, product=False):
|
||||
CopyToBucketWithMode(src, dst, False, product, 'dart')
|
||||
|
||||
|
||||
def BuildBucket():
|
||||
def BuildBucket(runtime_mode, arch, product):
|
||||
RemoveDirectoryIfExists(_bucket_directory)
|
||||
|
||||
CopyToBucket('fuchsia_debug/', 'flutter/debug/')
|
||||
CopyToBucket('fuchsia_profile/', 'flutter/profile/')
|
||||
CopyToBucket('fuchsia_release/', 'flutter/release/', True)
|
||||
out_dir = 'fuchsia_%s_%s/' % (runtime_mode, arch)
|
||||
bucket_dir = 'flutter/%s/%s/' % (arch, runtime_mode)
|
||||
CopyToBucket(out_dir, bucket_dir, product)
|
||||
|
||||
|
||||
def ProcessCIPDPakcage(upload, engine_version):
|
||||
@@ -187,6 +186,24 @@ def GetTargetsToBuild(product=False):
|
||||
return targets_to_build
|
||||
|
||||
|
||||
def BuildTarget(runtime_mode, arch, product):
|
||||
out_dir = 'fuchsia_%s_%s' % (runtime_mode, arch)
|
||||
flags = [
|
||||
'--fuchsia',
|
||||
# The source does not require LTO and LTO is not wired up for targets.
|
||||
'--no-lto',
|
||||
'--fuchsia-cpu',
|
||||
arch,
|
||||
'--runtime-mode',
|
||||
runtime_mode
|
||||
]
|
||||
|
||||
RunGN(out_dir, flags)
|
||||
BuildNinjaTargets(out_dir, GetTargetsToBuild(product))
|
||||
|
||||
return
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
@@ -203,23 +220,15 @@ def main():
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
common_flags = [
|
||||
'--fuchsia',
|
||||
# The source does not require LTO and LTO is not wired up for targets.
|
||||
'--no-lto',
|
||||
]
|
||||
|
||||
RunGN('fuchsia_debug', common_flags + ['--runtime-mode', 'debug'])
|
||||
|
||||
RunGN('fuchsia_profile', common_flags + ['--runtime-mode', 'profile'])
|
||||
|
||||
RunGN('fuchsia_release', common_flags + ['--runtime-mode', 'release'])
|
||||
|
||||
BuildNinjaTargets('fuchsia_debug', GetTargetsToBuild())
|
||||
BuildNinjaTargets('fuchsia_profile', GetTargetsToBuild())
|
||||
BuildNinjaTargets('fuchsia_release', GetTargetsToBuild(True))
|
||||
|
||||
BuildBucket()
|
||||
archs = ['x64', 'arm64']
|
||||
runtime_modes = ['debug', 'profile', 'release']
|
||||
product_modes = [False, False, True]
|
||||
for arch in archs:
|
||||
for i in range(3):
|
||||
runtime_mode = runtime_modes[i]
|
||||
product = product_modes[i]
|
||||
BuildTarget(runtime_mode, arch, product)
|
||||
BuildBucket(runtime_mode, arch, product)
|
||||
|
||||
ProcessCIPDPakcage(args.upload, args.engine_version)
|
||||
|
||||
|
||||
@@ -40,6 +40,9 @@ def get_out_dir(args):
|
||||
if args.linux_cpu is not None:
|
||||
target_dir.append(args.linux_cpu)
|
||||
|
||||
if args.target_os == 'fuchsia' and args.fuchsia_cpu is not None:
|
||||
target_dir.append(args.fuchsia_cpu)
|
||||
|
||||
if args.enable_vulkan:
|
||||
target_dir.append('vulkan')
|
||||
|
||||
@@ -166,6 +169,8 @@ def to_gn_args(args):
|
||||
gn_args['target_cpu'] = args.ios_cpu
|
||||
elif args.target_os == 'linux':
|
||||
gn_args['target_cpu'] = args.linux_cpu
|
||||
elif args.target_os == 'fuchsia':
|
||||
gn_args['target_cpu'] = args.fuchsia_cpu
|
||||
else:
|
||||
# Building host artifacts
|
||||
gn_args['target_cpu'] = 'x64'
|
||||
@@ -290,6 +295,7 @@ def parse_args(args):
|
||||
parser.add_argument('--simulator', action='store_true', default=False)
|
||||
parser.add_argument('--fuchsia', dest='target_os', action='store_const', const='fuchsia')
|
||||
parser.add_argument('--linux-cpu', type=str, choices=['x64', 'x86', 'arm64', 'arm'])
|
||||
parser.add_argument('--fuchsia-cpu', type=str, choices=['x64', 'arm64'], default = 'x64')
|
||||
parser.add_argument('--arm-float-abi', type=str, choices=['hard', 'soft', 'softfp'])
|
||||
|
||||
parser.add_argument('--goma', default=True, action='store_true')
|
||||
|
||||
Reference in New Issue
Block a user