[ VM / DartDev ] Run dartdev from kernel instead of AppJIT snapshot
Fixes https://github.com/dart-lang/sdk/issues/42804 Change-Id: I32b19e72f038131b00059fff2f2db61686a8db74 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157601 Reviewed-by: Siva Annamalai <asiva@google.com> Commit-Queue: Ben Konyi <bkonyi@google.com>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
d4e4abdef6
commit
4fb4e0af2d
@@ -62,7 +62,7 @@ Utils::CStringUniquePtr DartDevIsolate::TryResolveDartDevSnapshotPath() {
|
||||
|
||||
// First assume we're in dart-sdk/bin.
|
||||
char* snapshot_path =
|
||||
Utils::SCreate("%ssnapshots/dartdev.dart.snapshot", dir_prefix.get());
|
||||
Utils::SCreate("%s../lib/_internal/dartdev.dill", dir_prefix.get());
|
||||
if (File::Exists(nullptr, snapshot_path)) {
|
||||
return Utils::CreateCStringUniquePtr(snapshot_path);
|
||||
}
|
||||
@@ -70,7 +70,7 @@ Utils::CStringUniquePtr DartDevIsolate::TryResolveDartDevSnapshotPath() {
|
||||
|
||||
// If we're not in dart-sdk/bin, we might be in one of the $SDK/out/*
|
||||
// directories. Try to use a snapshot rom a previously built SDK.
|
||||
snapshot_path = Utils::SCreate("%sdartdev.dart.snapshot", dir_prefix.get());
|
||||
snapshot_path = Utils::SCreate("%sdartdev.dill", dir_prefix.get());
|
||||
if (File::Exists(nullptr, snapshot_path)) {
|
||||
return Utils::CreateCStringUniquePtr(snapshot_path);
|
||||
}
|
||||
|
||||
+12
-9
@@ -48,7 +48,6 @@ declare_args() {
|
||||
# ........dart2js.dart.snapshot
|
||||
# ........dartanalyzer.dart.snapshot
|
||||
# ........dds.dart.snapshot
|
||||
# ........dartdev.dart.snapshot
|
||||
# ........dartdoc.dart.snapshot
|
||||
# ........dartfmt.dart.snapshot
|
||||
# ........dartdevc.dart.snapshot
|
||||
@@ -79,6 +78,7 @@ declare_args() {
|
||||
# ........dart2js_server_platform.dill
|
||||
# ........dart2js_platform_strong.dill
|
||||
# ........dart2js_server_platform_strong.dill
|
||||
# ........dartdev.dill
|
||||
# ........vm_platform_strong.dill
|
||||
# ........dev_compiler/
|
||||
# ......async/
|
||||
@@ -122,10 +122,6 @@ _platform_sdk_snapshots = [
|
||||
"dartanalyzer",
|
||||
"../utils/dartanalyzer:generate_dartanalyzer_snapshot",
|
||||
],
|
||||
[
|
||||
"dartdev",
|
||||
"../utils/dartdev:dartdev",
|
||||
],
|
||||
[
|
||||
"dartdoc",
|
||||
"../utils/dartdoc",
|
||||
@@ -171,10 +167,6 @@ _full_sdk_snapshots = [
|
||||
"dartanalyzer",
|
||||
"../utils/dartanalyzer:generate_dartanalyzer_snapshot",
|
||||
],
|
||||
[
|
||||
"dartdev",
|
||||
"../utils/dartdev:dartdev",
|
||||
],
|
||||
[
|
||||
"dartdevc",
|
||||
"../utils/dartdevc",
|
||||
@@ -616,6 +608,16 @@ copy("copy_vm_dill_files") {
|
||||
outputs = [ "$root_out_dir/dart-sdk/lib/_internal/{{source_file_part}}" ]
|
||||
}
|
||||
|
||||
copy("copy_dartdev_dill_files") {
|
||||
visibility = [ ":create_common_sdk" ]
|
||||
deps = [
|
||||
":copy_libraries",
|
||||
"../utils/dartdev:dartdev",
|
||||
]
|
||||
sources = [ "$root_out_dir/dartdev.dill" ]
|
||||
outputs = [ "$root_out_dir/dart-sdk/lib/_internal/{{source_file_part}}" ]
|
||||
}
|
||||
|
||||
copy("copy_dart2js_dill_files") {
|
||||
visibility = [ ":create_full_sdk" ]
|
||||
deps = [
|
||||
@@ -890,6 +892,7 @@ group("create_common_sdk") {
|
||||
":copy_analysis_summaries",
|
||||
":copy_api_readme",
|
||||
":copy_dart",
|
||||
":copy_dartdev_dill_files",
|
||||
":copy_dartdoc_files",
|
||||
":copy_headers",
|
||||
":copy_libraries_dart",
|
||||
|
||||
@@ -48,6 +48,9 @@ declare_args() {
|
||||
template("_application_snapshot") {
|
||||
assert(defined(invoker.main_dart), "Must specify 'main_dart'")
|
||||
assert(defined(invoker.training_args), "Must specify 'training_args'")
|
||||
if (defined(invoker.dart_snapshot_kind)) {
|
||||
dart_snapshot_kind = invoker.dart_snapshot_kind
|
||||
}
|
||||
snapshot_vm_args = []
|
||||
if (defined(invoker.vm_args)) {
|
||||
snapshot_vm_args = invoker.vm_args
|
||||
|
||||
@@ -18,20 +18,21 @@ dartfix_files = exec_script("../../tools/list_dart_files.py",
|
||||
],
|
||||
"list lines")
|
||||
group("dartdev") {
|
||||
public_deps = [ ":copy_dartdev_snapshot" ]
|
||||
public_deps = [ ":copy_dartdev_kernel" ]
|
||||
}
|
||||
|
||||
copy("copy_dartdev_snapshot") {
|
||||
copy("copy_dartdev_kernel") {
|
||||
visibility = [ ":dartdev" ]
|
||||
public_deps = [ ":generate_dartdev_snapshot" ]
|
||||
sources = [ "$root_gen_dir/dartdev.dart.snapshot" ]
|
||||
outputs = [ "$root_out_dir/dartdev.dart.snapshot" ]
|
||||
public_deps = [ ":generate_dartdev_kernel" ]
|
||||
sources = [ "$root_gen_dir/dartdev.dill" ]
|
||||
outputs = [ "$root_out_dir/dartdev.dill" ]
|
||||
}
|
||||
|
||||
application_snapshot("generate_dartdev_snapshot") {
|
||||
application_snapshot("generate_dartdev_kernel") {
|
||||
dart_snapshot_kind = "kernel"
|
||||
main_dart = "../../pkg/dartdev/bin/dartdev.dart"
|
||||
training_args = [ "--help" ]
|
||||
training_args = []
|
||||
deps = [ "../dds:dds" ]
|
||||
inputs = dartdev_files + dartfix_files
|
||||
output = "$root_gen_dir/dartdev.dart.snapshot"
|
||||
output = "$root_gen_dir/dartdev.dill"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user