dart-sdk/utils/dartanalyzer/BUILD.gn
Nate Bosch f9c68a5679 Replace a bunch of references to .packages
Most of these arguments are flowing through to a `--packages` argument
which allows passing the `package_config.json` file. In the long term we
should remove the `.packages` file entirely.

TEST=None, the change should have no visible impact.

Change-Id: I60a8b175d5e217a85588bbcb91cc5095514066b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211503
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2021-10-12 20:16:15 +00:00

52 lines
1.4 KiB
Text

# 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("../../sdk_args.gni")
import("../application_snapshot.gni")
import("../create_timestamp.gni")
group("dartanalyzer") {
deps = [
":generate_dartanalyzer_snapshot",
":generate_summary_strong",
]
}
application_snapshot("generate_dartanalyzer_snapshot") {
main_dart = "../../pkg/analyzer_cli/bin/analyzer.dart"
training_args = [
"--help",
# TODO(34616): This is broken on Fuchsia.
# "--dart-sdk=" + rebase_path("../../sdk/"),
# "--train-snapshot",
# rebase_path("../../tests/language_2/first_test.dart")
]
name = "dartanalyzer"
}
sdk_root = "../../sdk"
create_timestamp_file("sdk_lib_files") {
path = rebase_path("$sdk_root/lib")
output = "$target_gen_dir/sdk_lib_files.stamp"
}
prebuilt_dart_action("generate_summary_strong") {
deps = [
":sdk_lib_files",
"../../sdk:copy_libraries",
"../../sdk:write_version_file",
]
script = "../../pkg/analyzer/tool/summary/build_sdk_summaries.dart"
packages = "../../.dart_tool/package_config.json"
output = "$root_gen_dir/strong.sum"
outputs = [ output ]
vm_args = [ "-Dsdk_hash=$sdk_hash" ]
args = [
"build",
rebase_path(output),
rebase_path("$root_out_dir/$dart_sdk_output"),
]
}