2016-09-29 20:23:00 +00:00
|
|
|
# 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.
|
|
|
|
|
2018-05-03 21:07:13 +00:00
|
|
|
import("../../build/dart/dart_action.gni")
|
2016-11-10 19:16:24 +00:00
|
|
|
import("../application_snapshot.gni")
|
2016-09-29 20:23:00 +00:00
|
|
|
|
|
|
|
group("dartanalyzer") {
|
|
|
|
deps = [
|
|
|
|
":generate_dartanalyzer_snapshot",
|
|
|
|
":generate_summary_strong",
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2016-10-05 14:50:40 +00:00
|
|
|
analyzer_files = exec_script("../../tools/list_dart_files.py",
|
2017-06-13 15:48:53 +00:00
|
|
|
[
|
|
|
|
"absolute",
|
|
|
|
rebase_path("../../pkg/analyzer"),
|
|
|
|
],
|
2016-09-29 20:23:00 +00:00
|
|
|
"list lines")
|
|
|
|
|
|
|
|
application_snapshot("generate_dartanalyzer_snapshot") {
|
|
|
|
main_dart = "../../pkg/analyzer_cli/bin/analyzer.dart"
|
2016-10-22 00:40:21 +00:00
|
|
|
training_args = [
|
2018-09-28 21:43:04 +00:00
|
|
|
"--help",
|
|
|
|
# TODO(34616): This is broken on Fuchsia.
|
|
|
|
# "--dart-sdk=" + rebase_path("../../sdk/"),
|
|
|
|
# "--train-snapshot",
|
2018-10-11 23:45:18 +00:00
|
|
|
# rebase_path("../../tests/language_2/first_test.dart")
|
2016-10-22 00:40:21 +00:00
|
|
|
]
|
2016-09-29 20:23:00 +00:00
|
|
|
name = "dartanalyzer"
|
|
|
|
}
|
|
|
|
|
2016-10-05 14:50:40 +00:00
|
|
|
sdk_lib_files = exec_script("../../tools/list_dart_files.py",
|
2017-06-13 15:48:53 +00:00
|
|
|
[
|
|
|
|
"absolute",
|
|
|
|
rebase_path("../../sdk/lib"),
|
|
|
|
],
|
2016-09-29 20:23:00 +00:00
|
|
|
"list lines")
|
|
|
|
|
2020-07-31 20:49:29 +00:00
|
|
|
dart_action("generate_summary_strong") {
|
|
|
|
deps = [
|
|
|
|
"../../sdk:copy_libraries",
|
|
|
|
"../../sdk:write_version_file",
|
|
|
|
]
|
2018-08-30 12:32:52 +00:00
|
|
|
script = "../../pkg/analyzer/tool/summary/build_sdk_summaries.dart"
|
|
|
|
packages = "../../.packages"
|
|
|
|
inputs = sdk_lib_files + analyzer_files
|
|
|
|
output = "$root_gen_dir/strong.sum"
|
2020-03-10 21:56:11 +00:00
|
|
|
outputs = [ output ]
|
2020-07-07 06:08:20 +00:00
|
|
|
vm_args = [ "-Dsdk_hash=$sdk_hash" ]
|
2020-06-16 23:37:36 +00:00
|
|
|
args = [
|
|
|
|
"build",
|
|
|
|
rebase_path(output),
|
2020-07-31 20:49:29 +00:00
|
|
|
rebase_path("$root_out_dir/dart-sdk"),
|
2020-06-16 23:37:36 +00:00
|
|
|
]
|
2016-09-29 20:23:00 +00:00
|
|
|
}
|