diff --git a/BUILD.gn b/BUILD.gn index dc28b546923..5619e4927b1 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -55,6 +55,7 @@ group("runtime") { "runtime/bin:sample_extension", "runtime/bin:test_extension", "runtime/vm:kernel_platform_files($host_toolchain)", + "utils/dartdev:dartdev", "utils/kernel-service:kernel-service", ] } diff --git a/runtime/bin/dartdev_utils.cc b/runtime/bin/dartdev_utils.cc index 0314d6e0dcc..3f14bc45ab7 100644 --- a/runtime/bin/dartdev_utils.cc +++ b/runtime/bin/dartdev_utils.cc @@ -40,8 +40,7 @@ bool DartDevUtils::TryResolveDartDevSnapshotPath(char** script_name) { // If we're not in dart-sdk/bin, we might be in one of the $SDK/out/* // directories. Try to use a snapshot from a previously built SDK. - snapshot_path = Utils::SCreate( - "%sdart-sdk/bin/snapshots/dartdev.dart.snapshot", dir_prefix.get()); + snapshot_path = Utils::SCreate("%sdartdev.dart.snapshot", dir_prefix.get()); if (File::Exists(nullptr, snapshot_path)) { *script_name = snapshot_path; return true; diff --git a/utils/dartdev/BUILD.gn b/utils/dartdev/BUILD.gn index 495643d7f51..87797c12fb4 100644 --- a/utils/dartdev/BUILD.gn +++ b/utils/dartdev/BUILD.gn @@ -18,8 +18,15 @@ dartfix_files = exec_script("../../tools/list_dart_files.py", ], "list lines") -application_snapshot("dartdev") { +copy("dartdev") { + deps = [ ":dartdev_snapshot" ] + sources = [ "$root_gen_dir/dartdev.dart.snapshot" ] + outputs = [ "$root_out_dir/dartdev.dart.snapshot" ] +} + +application_snapshot("dartdev_snapshot") { main_dart = "../../pkg/dartdev/bin/dartdev.dart" training_args = [ "--help" ] inputs = dartdev_files + dartfix_files + output = "$root_gen_dir/dartdev.dart.snapshot" }