[fuchsia] Adds --targets arg for build_fuchsia_artifacts.py (flutter/engine#19109)
The Fuchsia artifact builder didn't allow the end user to add more packages to build for Fuchsia. The current default is building only the platform-specific packages; but packages like `flutter/shell/common:shell_tests` are also defined for Fuchsia but not compiled by default. This change makes it less of a hassle to compile such packages.
This commit is contained in:
@@ -215,14 +215,14 @@ def GetRunnerTarget(runner_type, product, aot):
|
||||
return base + target
|
||||
|
||||
|
||||
def GetTargetsToBuild(product=False):
|
||||
def GetTargetsToBuild(product=False, additional_targets=[]):
|
||||
targets_to_build = [
|
||||
'flutter/shell/platform/fuchsia:fuchsia',
|
||||
]
|
||||
] + additional_targets
|
||||
return targets_to_build
|
||||
|
||||
|
||||
def BuildTarget(runtime_mode, arch, product, enable_lto):
|
||||
def BuildTarget(runtime_mode, arch, product, enable_lto, additional_targets=[]):
|
||||
out_dir = 'fuchsia_%s_%s' % (runtime_mode, arch)
|
||||
flags = [
|
||||
'--fuchsia',
|
||||
@@ -276,6 +276,12 @@ def main():
|
||||
default=False,
|
||||
help='If set, skips building and just creates packages.')
|
||||
|
||||
parser.add_argument(
|
||||
'--targets',
|
||||
default='',
|
||||
help=('Comma-separated list; adds additional targets to build for '
|
||||
'Fuchsia.'))
|
||||
|
||||
args = parser.parse_args()
|
||||
RemoveDirectoryIfExists(_bucket_directory)
|
||||
build_mode = args.runtime_mode
|
||||
@@ -292,7 +298,8 @@ def main():
|
||||
product = product_modes[i]
|
||||
if build_mode == 'all' or runtime_mode == build_mode:
|
||||
if not args.skip_build:
|
||||
BuildTarget(runtime_mode, arch, product, enable_lto)
|
||||
BuildTarget(runtime_mode, arch, product, enable_lto,
|
||||
args.targets.split(","))
|
||||
BuildBucket(runtime_mode, arch, product)
|
||||
|
||||
if args.upload:
|
||||
|
||||
Reference in New Issue
Block a user