mirror of
https://github.com/dart-lang/sdk
synced 2024-10-02 23:24:42 +00:00
Roll Fuchsia SDK to 18.20240208.2.1.
Sync build setup from Flutter. Change-Id: Ic7958dc42a79b7d2acd3f5279f816333ca31299e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351242 Commit-Queue: Ryan Macnak <rmacnak@google.com> Reviewed-by: Alexander Aprelev <aam@google.com>
This commit is contained in:
parent
a2574f28d3
commit
9f7dbd6b4d
2
DEPS
2
DEPS
|
@ -84,7 +84,7 @@ vars = {
|
|||
"reclient_version": "git_revision:f3883c2237b0eb9cc9524cb571b5ab8378f257e4",
|
||||
|
||||
# Update from https://chrome-infra-packages.appspot.com/p/fuchsia/sdk/core
|
||||
"fuchsia_sdk_version": "version:17.20240105.3.1",
|
||||
"fuchsia_sdk_version": "version:18.20240208.2.1",
|
||||
"download_fuchsia_deps": False,
|
||||
|
||||
# Ninja, runs the build based on files generated by GN.
|
||||
|
|
|
@ -3,10 +3,12 @@
|
|||
# Copyright 2013 The Flutter Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
""" Generate C/C++ headers and source files from the set of FIDL files specified
|
||||
in the meta.json manifest.
|
||||
"""
|
||||
|
||||
|
||||
import argparse
|
||||
import collections
|
||||
import json
|
||||
|
@ -14,55 +16,32 @@ import os
|
|||
import subprocess
|
||||
import sys
|
||||
|
||||
|
||||
def GetFIDLFilesRecursive(libraries, sdk_base, path):
|
||||
with open(path) as json_file:
|
||||
parsed = json.load(json_file)
|
||||
result = []
|
||||
deps = parsed['deps']
|
||||
for dep in deps:
|
||||
dep_meta_json = os.path.abspath('%s/fidl/%s/meta.json' %
|
||||
(sdk_base, dep))
|
||||
dep_meta_json = os.path.abspath('%s/fidl/%s/meta.json' % (sdk_base, dep))
|
||||
GetFIDLFilesRecursive(libraries, sdk_base, dep_meta_json)
|
||||
libraries[parsed['name']] = result + parsed['sources']
|
||||
|
||||
|
||||
def GetFIDLFilesByLibraryName(sdk_base, root):
|
||||
libraries = collections.OrderedDict()
|
||||
GetFIDLFilesRecursive(libraries, sdk_base, root)
|
||||
return libraries
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser = argparse.ArgumentParser();
|
||||
|
||||
parser.add_argument('--fidlc-bin',
|
||||
dest='fidlc_bin',
|
||||
action='store',
|
||||
required=True)
|
||||
parser.add_argument('--fidlgen-bin',
|
||||
dest='fidlgen_bin',
|
||||
action='append',
|
||||
required=False)
|
||||
parser.add_argument('--fidlc-bin', dest='fidlc_bin', action='store', required=True)
|
||||
parser.add_argument('--fidlgen-bin', dest='fidlgen_bin', action='append', required=False)
|
||||
|
||||
parser.add_argument('--sdk-base',
|
||||
dest='sdk_base',
|
||||
action='store',
|
||||
required=True)
|
||||
parser.add_argument('--sdk-base', dest='sdk_base', action='store', required=True)
|
||||
parser.add_argument('--root', dest='root', action='store', required=True)
|
||||
parser.add_argument('--json', dest='json', action='store', required=True)
|
||||
parser.add_argument('--fidlgen-output-root',
|
||||
dest='fidlgen_output_root',
|
||||
action='store',
|
||||
required=False)
|
||||
parser.add_argument('--output-c-tables',
|
||||
dest='output_c_tables',
|
||||
action='store',
|
||||
required=True)
|
||||
parser.add_argument('--target-api-level',
|
||||
dest='target_api_level',
|
||||
action='store',
|
||||
required=False)
|
||||
parser.add_argument('--fidlgen-output-root', dest='fidlgen_output_root', action='store', required=False)
|
||||
parser.add_argument('--target-api-level', dest='target_api_level', action='store', required=False)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
|
@ -71,7 +50,9 @@ def main():
|
|||
fidl_files_by_name = GetFIDLFilesByLibraryName(args.sdk_base, args.root)
|
||||
|
||||
fidlc_command = [
|
||||
args.fidlc_bin, '--tables', args.output_c_tables, '--json', args.json
|
||||
args.fidlc_bin,
|
||||
'--json',
|
||||
args.json
|
||||
]
|
||||
|
||||
if args.target_api_level:
|
||||
|
@ -100,7 +81,10 @@ def main():
|
|||
assert os.path.exists(fidlgen_bin)
|
||||
|
||||
fidlgen_command = [
|
||||
fidlgen_bin, '-json', args.json, '-root',
|
||||
fidlgen_bin,
|
||||
'-json',
|
||||
args.json,
|
||||
'-root',
|
||||
args.fidlgen_output_root
|
||||
]
|
||||
|
||||
|
@ -111,6 +95,5 @@ def main():
|
|||
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
|
|
|
@ -90,8 +90,11 @@ template("fuchsia_fidl_library") {
|
|||
library_name_json = "${meta_json.name}.json"
|
||||
|
||||
foreach(dep, meta_json.deps) {
|
||||
# TODO(https://fxbug.dev/42172334): Make zx less special.
|
||||
if (dep != "zx") {
|
||||
_deps += [ ":$dep" ]
|
||||
}
|
||||
}
|
||||
|
||||
config_name = "config_$target_name"
|
||||
config(config_name) {
|
||||
|
@ -106,8 +109,6 @@ template("fuchsia_fidl_library") {
|
|||
|
||||
inputs = [ invoker.meta ]
|
||||
|
||||
outputs = [ "$target_gen_dir/$library_name_slashes/cpp/tables.c" ]
|
||||
|
||||
args = [
|
||||
"--fidlc-bin",
|
||||
rebase_path("${_fuchsia_tools_path}/fidlc"),
|
||||
|
@ -117,8 +118,6 @@ template("fuchsia_fidl_library") {
|
|||
rebase_path(invoker.meta),
|
||||
"--json",
|
||||
rebase_path("$target_gen_dir/$library_name_json"),
|
||||
"--output-c-tables",
|
||||
rebase_path("$target_gen_dir/$library_name_slashes/cpp/tables.c"),
|
||||
]
|
||||
|
||||
if (fuchsia_target_api_level != -1) {
|
||||
|
@ -128,12 +127,11 @@ template("fuchsia_fidl_library") {
|
|||
]
|
||||
}
|
||||
|
||||
if (!defined(invoker.only_generate_tables) ||
|
||||
!invoker.only_generate_tables) {
|
||||
outputs += [
|
||||
outputs = [
|
||||
"$target_gen_dir/$library_name_slashes/cpp/fidl.cc",
|
||||
"$target_gen_dir/$library_name_slashes/cpp/fidl.h",
|
||||
"$target_gen_dir/$library_name_slashes/cpp/fidl_test_base.h",
|
||||
"$target_gen_dir/$library_name_slashes/cpp/tables.c",
|
||||
|
||||
"$target_gen_dir/fidl/$library_name/cpp/common_types.cc",
|
||||
"$target_gen_dir/fidl/$library_name/cpp/common_types.h",
|
||||
|
@ -165,7 +163,6 @@ template("fuchsia_fidl_library") {
|
|||
rebase_path("$target_gen_dir"),
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
source_set(target_name) {
|
||||
public_configs = [ ":$config_name" ]
|
||||
|
@ -218,6 +215,14 @@ template("_fuchsia_cc_source_library") {
|
|||
_deps += [ "../fidl:$dep" ]
|
||||
}
|
||||
|
||||
foreach(binding_dep, meta_json.fidl_binding_deps) {
|
||||
# No need to check "binding_deps.binding_type" because we always
|
||||
# generate both hlcpp and natural bindings.
|
||||
foreach(dep, binding_dep.deps) {
|
||||
_deps += [ "../fidl:$dep" ]
|
||||
}
|
||||
}
|
||||
|
||||
source_set(target_name) {
|
||||
output_name = _output_name
|
||||
public = _public_headers
|
||||
|
@ -309,12 +314,11 @@ template("fuchsia_sdk") {
|
|||
meta = part_meta_rebased
|
||||
}
|
||||
} else if (part_type == "fidl_library") {
|
||||
# TODO(https://fxbug.dev/42172334): Make zx less special.
|
||||
if (subtarget_name != "zx") {
|
||||
fuchsia_fidl_library(subtarget_name) {
|
||||
meta = part_meta_rebased
|
||||
|
||||
# TODO(fxbug.dev/90838): Remove the zx special-case when generic
|
||||
# option is available.
|
||||
only_generate_tables = subtarget_name == "zx"
|
||||
}
|
||||
}
|
||||
} else if (part_type == "cc_prebuilt_library") {
|
||||
_fuchsia_cc_prebuilt_library(subtarget_name) {
|
||||
|
@ -334,7 +338,7 @@ template("fuchsia_repo") {
|
|||
assert(defined(invoker.repo), "The location of the repo should be specified.")
|
||||
|
||||
action(target_name) {
|
||||
script = "//tools/fuchsia/gen_repo.py"
|
||||
script = "//flutter/tools/fuchsia/gen_repo.py"
|
||||
|
||||
pm_binary = rebase_path("${_fuchsia_tools_path}/pm")
|
||||
repo_directory = invoker.repo
|
||||
|
|
|
@ -235,7 +235,7 @@ def ToGnArgs(args, mode, arch, target_os, sanitizer, verify_sdk_hash,
|
|||
gn_args['arm_float_abi'] = floatabi
|
||||
gn_args['arm_use_neon'] = True
|
||||
if gn_args['target_os'] == 'fuchsia':
|
||||
gn_args['fuchsia_target_api_level'] = 15
|
||||
gn_args['fuchsia_target_api_level'] = 16
|
||||
|
||||
gn_args['is_debug'] = mode == 'debug'
|
||||
gn_args['is_release'] = mode == 'release'
|
||||
|
|
Loading…
Reference in a new issue