a9ab8f4e7d
For Dart 2 snapshots, application_snapshots() hardcodes a deps on //utils/kernel-service:copy_kernel_service_snapshot related #33167 Change-Id: I9a598e83a3e8ebb9a27bfe83132f3a957f2fea0e Reviewed-on: https://dart-review.googlesource.com/56161 Reviewed-by: Nate Bosch <nbosch@google.com> Commit-Queue: Zach Anderson <zra@google.com>
86 lines
2.3 KiB
Plaintext
86 lines
2.3 KiB
Plaintext
# Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
|
|
# for details. All rights reserved. Use of this source code is governed by a
|
|
# BSD-style license that can be found in the LICENSE file.
|
|
|
|
import("../../build/dart/dart_action.gni")
|
|
import("../application_snapshot.gni")
|
|
|
|
group("dartanalyzer") {
|
|
deps = [
|
|
":generate_dartanalyzer_snapshot",
|
|
":generate_summary_spec",
|
|
":generate_summary_strong",
|
|
]
|
|
}
|
|
|
|
analyzer_files = exec_script("../../tools/list_dart_files.py",
|
|
[
|
|
"absolute",
|
|
rebase_path("../../pkg/analyzer"),
|
|
],
|
|
"list lines")
|
|
|
|
application_snapshot("generate_dartanalyzer_snapshot") {
|
|
dart_version = 2
|
|
main_dart = "../../pkg/analyzer_cli/bin/analyzer.dart"
|
|
training_args = [
|
|
"--dart-sdk=" + rebase_path("../../sdk"),
|
|
rebase_path("../../tests/language/first_test.dart"),
|
|
]
|
|
name = "dartanalyzer"
|
|
}
|
|
|
|
if (current_os == "linux") {
|
|
aot_assembly("dartanalyzer_aot_assembly") {
|
|
main_dart = "../../pkg/analyzer_cli/bin/analyzer.dart"
|
|
name = "dartanalyzer"
|
|
}
|
|
|
|
# This target is for Goma. It should not be used in the SDK.
|
|
executable("dartanalyzer_aot") {
|
|
deps = [
|
|
"../../runtime/bin:dart_precompiled_runtime_for_linking",
|
|
":dartanalyzer_aot_assembly",
|
|
]
|
|
sources = [
|
|
"$root_gen_dir/dartanalyzer.dart.S"
|
|
]
|
|
}
|
|
}
|
|
|
|
sdk_lib_files = exec_script("../../tools/list_dart_files.py",
|
|
[
|
|
"absolute",
|
|
rebase_path("../../sdk/lib"),
|
|
],
|
|
"list lines")
|
|
|
|
template("generate_summary") {
|
|
assert(defined(invoker.type), "Must specify the summary type")
|
|
type = invoker.type
|
|
assert(type == "spec" || type == "strong")
|
|
|
|
prebuilt_dart_action(target_name) {
|
|
script = "../../pkg/analyzer/tool/summary/build_sdk_summaries.dart"
|
|
packages = "../../.packages"
|
|
inputs = sdk_lib_files + analyzer_files
|
|
output = "$root_gen_dir/$type.sum"
|
|
outputs = [
|
|
output,
|
|
]
|
|
args = [
|
|
"build-$type",
|
|
rebase_path(output),
|
|
rebase_path("../../sdk"),
|
|
]
|
|
}
|
|
}
|
|
|
|
generate_summary("generate_summary_spec") {
|
|
type = "spec"
|
|
}
|
|
|
|
generate_summary("generate_summary_strong") {
|
|
type = "strong"
|
|
}
|