Add ability to stamp fuchsia packages with API level (flutter/engine#29851)
This commit is contained in:
2
DEPS
2
DEPS
@@ -99,7 +99,7 @@ allowed_hosts = [
|
||||
]
|
||||
|
||||
deps = {
|
||||
'src': 'https://github.com/flutter/buildroot.git' + '@' + '0b267aac6794712a6d9d0f31dda3f844325d0258',
|
||||
'src': 'https://github.com/flutter/buildroot.git' + '@' + '42be4395efc85e455bbdd555ef2791615338dbea',
|
||||
|
||||
# Fuchsia compatibility
|
||||
#
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
import("//build/fuchsia/config.gni")
|
||||
import("//flutter/tools/fuchsia/fuchsia_debug_symbols.gni")
|
||||
import("//flutter/tools/fuchsia/fuchsia_libs.gni")
|
||||
|
||||
@@ -149,6 +150,14 @@ template("_fuchsia_archive") {
|
||||
"--manifest-json-file",
|
||||
rebase_path(manifest_json_file, root_build_dir),
|
||||
]
|
||||
|
||||
if (fuchsia_target_api_level != -1) {
|
||||
args += [
|
||||
"--api-level",
|
||||
"${fuchsia_target_api_level}",
|
||||
]
|
||||
}
|
||||
|
||||
outputs = [
|
||||
manifest_json_file,
|
||||
"${far_base_dir}.manifest",
|
||||
|
||||
@@ -63,6 +63,8 @@ def main():
|
||||
'--manifest-json-file', dest='manifest_json_file', action='store', required=True)
|
||||
parser.add_argument(
|
||||
'--far-name', dest='far_name', action='store', required=False)
|
||||
parser.add_argument(
|
||||
'--api-level', dest='api_level', action='store', required=False)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
@@ -98,10 +100,18 @@ def main():
|
||||
# Use check_output so if anything goes wrong we get the output.
|
||||
try:
|
||||
|
||||
build_command = ['build', '--output-package-manifest', args.manifest_json_file]
|
||||
|
||||
if args.api_level is not None:
|
||||
build_command = ['--api-level', args.api_level] + build_command
|
||||
|
||||
archive_command = ['archive', '--output='+ os.path.join(os.path.dirname(output_dir), args.far_name + "-0")]
|
||||
|
||||
pm_commands = [
|
||||
['build', '--output-package-manifest', args.manifest_json_file],
|
||||
['archive', '--output='+ os.path.join(os.path.dirname(output_dir), args.far_name + "-0")],
|
||||
build_command,
|
||||
archive_command
|
||||
]
|
||||
|
||||
for pm_command in pm_commands:
|
||||
subprocess.check_output(pm_command_base + pm_command)
|
||||
except subprocess.CalledProcessError as e:
|
||||
|
||||
@@ -404,6 +404,9 @@ def to_gn_args(args):
|
||||
if args.target_os in ['android'] and gn_args['target_cpu'] in ['x64' , 'arm64']:
|
||||
gn_args['dart_use_compressed_pointers'] = True
|
||||
|
||||
if args.fuchsia_target_api_level is not None:
|
||||
gn_args['fuchsia_target_api_level'] = args.fuchsia_target_api_level
|
||||
|
||||
return gn_args
|
||||
|
||||
def parse_args(args):
|
||||
@@ -509,6 +512,8 @@ def parse_args(args):
|
||||
'true and is enabled on CI.')
|
||||
parser.add_argument('--no-prebuilt-dart-sdk', dest='prebuilt_dart_sdk', action='store_false')
|
||||
|
||||
parser.add_argument('--fuchsia-target-api-level', dest='fuchsia_target_api_level')
|
||||
|
||||
# Sanitizers.
|
||||
parser.add_argument('--asan', default=False, action='store_true')
|
||||
parser.add_argument('--lsan', default=False, action='store_true')
|
||||
|
||||
Reference in New Issue
Block a user