mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 13:57:58 +00:00
[GN] Use the prebuilt toolchain to build analyzer summaries
This will speed up cross-builds. TO-660 Change-Id: Idb1bf8839ffc3443ff620fbe94b733fe71d6bf84 Reviewed-on: https://dart-review.googlesource.com/30901 Reviewed-by: Siva Annamalai <asiva@google.com>
This commit is contained in:
parent
fcc6836b88
commit
8c21a6dd6b
|
@ -3,6 +3,7 @@
|
|||
# BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
import("../../build/compiled_action.gni")
|
||||
import("../../build/prebuilt_dart_sdk.gni")
|
||||
import("../application_snapshot.gni")
|
||||
|
||||
group("dartanalyzer") {
|
||||
|
@ -47,8 +48,27 @@ template("generate_summary") {
|
|||
assert(defined(invoker.type), "Must specify the summary type")
|
||||
type = invoker.type
|
||||
assert(type == "spec" || type == "strong")
|
||||
compiled_action(target_name) {
|
||||
tool = "../../runtime/bin:dart"
|
||||
action(target_name) {
|
||||
|
||||
if (!prebuilt_dart_exe_works) {
|
||||
deps = [ "../../runtime/bin:dart_bootstrap($dart_host_toolchain)" ]
|
||||
}
|
||||
|
||||
script = "../../tools/run_dart.py"
|
||||
|
||||
args = []
|
||||
if (!prebuilt_dart_exe_works) {
|
||||
dart_out_dir = get_label_info(
|
||||
"../../runtime/bin:dart_bootstrap($dart_host_toolchain)",
|
||||
"root_out_dir")
|
||||
dart_bootstrap =
|
||||
rebase_path("$dart_out_dir/dart_bootstrap$executable_suffix")
|
||||
args += [
|
||||
"--dart",
|
||||
dart_bootstrap,
|
||||
]
|
||||
}
|
||||
|
||||
inputs = sdk_lib_files + analyzer_files
|
||||
|
||||
output = "$root_gen_dir/$type.sum"
|
||||
|
@ -60,7 +80,8 @@ template("generate_summary") {
|
|||
build_sdk_summaries =
|
||||
rebase_path("../../pkg/analyzer/tool/summary/build_sdk_summaries.dart")
|
||||
|
||||
args = [
|
||||
args += [
|
||||
"--quiet",
|
||||
"--packages=$dot_packages",
|
||||
build_sdk_summaries,
|
||||
"build-$type",
|
||||
|
|
Loading…
Reference in a new issue