dartdev: Support running the AOT analyis_server snapshot for analyze command
The `dart analyze` command is quite separate from the `dart language-server` command. This CL adds support for `dart analyze`. Work towards https://github.com/dart-lang/sdk/issues/50498 Change-Id: I60a846ae5d3452c2bb050bd07502084ff44b82c0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425188 Commit-Queue: Samuel Rawlins <srawlins@google.com> Reviewed-by: Siva Annamalai <asiva@google.com>
This commit is contained in:
committed by
Commit Queue
parent
d7b3562cf4
commit
060e4e208c
@@ -9,13 +9,14 @@ aot_snapshot("analysis_server_aot") {
|
||||
main_dart = "../../pkg/analysis_server/bin/server.dart"
|
||||
name = "analysis_server_aot"
|
||||
output = "$root_gen_dir/analysis_server_aot.dart.snapshot"
|
||||
vm_args = [ "-Dbuilt_as_aot=true" ]
|
||||
args = [ "-Dbuilt_as_aot=true" ]
|
||||
}
|
||||
|
||||
aot_snapshot("analysis_server_aot_product") {
|
||||
main_dart = "../../pkg/analysis_server/bin/server.dart"
|
||||
name = "analysis_server_aot_product"
|
||||
output = "$root_gen_dir/analysis_server_aot_product.dart.snapshot"
|
||||
args = [ "-Dbuilt_as_aot=true" ]
|
||||
|
||||
# dartaotruntime in the dart sdk has dart_product_config applied to it,
|
||||
# so it is built in product mode in both release and
|
||||
@@ -32,5 +33,4 @@ application_snapshot("analysis_server") {
|
||||
"--sdk=" + rebase_path("../../sdk/"),
|
||||
"--train-using=" + rebase_path("../../pkg/compiler/lib"),
|
||||
]
|
||||
vm_args = [ "-Dbuilt_as_aot=false" ]
|
||||
}
|
||||
|
||||
@@ -98,6 +98,9 @@ template("aot_snapshot") {
|
||||
if (product_mode) {
|
||||
args += [ "-Ddart.vm.product=true" ]
|
||||
}
|
||||
if (defined(invoker.args)) {
|
||||
args += invoker.args
|
||||
}
|
||||
}
|
||||
|
||||
# Whether to build an AOT snapshot, which can be opened by dlopen.
|
||||
|
||||
Reference in New Issue
Block a user