Revert "[dartdev] Convert gen_kernel.dart.snapshot into an AOT snapshot"

This reverts commit 0f8069d9d0.

Reason for revert: Broke the following builds:
* vm-appjit-linux-product-x64
* vm-aot-*-product-*
* vm-ffi-android-product-*
as well as the following tests:
* pkg/dartdev/test/commands/compile_test
* pkg/vm_snapshot_analysis/test/instruction_sizes_test
* pkg/vm_snapshot_analysis/test/precompiler_trace_test

Original change's description:
> [dartdev] Convert gen_kernel.dart.snapshot into an AOT snapshot
>
> Convert gen_kernel to use an AOT snapshot in the
> dart compile exe
> command.
>
> TEST=ci
>
> Change-Id: I6e338525dabb4e84dc1edff8f0bbac803223e74d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327520
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

Change-Id: Ia7225516a17cab52c8506abee05ce0935941f1cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327641
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
This commit is contained in:
Tess Strickland 2023-09-25 10:17:52 +00:00 committed by Commit Queue
parent d7b522508e
commit 03c2003222
4 changed files with 17 additions and 15 deletions

View file

@ -13,7 +13,7 @@ final String executableSuffix = Platform.isWindows ? '.exe' : '';
final String dartaotruntime =
path.join(binDir.path, 'dartaotruntime$executableSuffix');
final String genKernel =
path.join(binDir.path, 'snapshots', 'gen_kernel_aot.dart.snapshot');
path.join(binDir.path, 'snapshots', 'gen_kernel.dart.snapshot');
final String genSnapshot =
path.join(binDir.path, 'utils', 'gen_snapshot$executableSuffix');
final String productPlatformDill = path.join(
@ -63,7 +63,7 @@ Future<void> generateNative({
final String kernelFile = path.join(tempDir.path, 'kernel.dill');
final kernelResult = await generateAotKernel(
dartaotruntime,
Platform.executable,
genKernel,
productPlatformDill,
sourcePath,

View file

@ -49,7 +49,7 @@ declare_args() {
# ........dds.dart.snapshot
# ........frontend_server_aot.dart.snapshot (AOT snapshot, if not on ia32)
# ........frontend_server.dart.snapshot
# ........gen_kernel_aot.dart.snapshot (if not on ia32)
# ........gen_kernel.dart.snapshot (if not on ia32)
# ........kernel-service.dart.snapshot
# ........kernel_worker.dart.snapshot
# ......resources/
@ -358,7 +358,7 @@ copy("copy_vm_platform_strong_product") {
copy("copy_gen_kernel_snapshot") {
visibility = [ ":group_dart2native" ]
deps = [ "../utils/gen_kernel" ]
sources = [ "$root_gen_dir/gen_kernel_aot.dart.snapshot" ]
sources = [ "$root_gen_dir/gen_kernel.dart.snapshot" ]
outputs =
[ "$root_out_dir/$dart_sdk_output/bin/snapshots/{{source_file_part}}" ]
}

View file

@ -3,7 +3,6 @@
# BSD-style license that can be found in the LICENSE file.
import("../build/dart/dart_action.gni")
import("../runtime/runtime_args.gni")
import("../sdk_args.gni")
_dart_root = get_path_info("..", "abspath")

View file

@ -39,18 +39,21 @@ prebuilt_dart_action("bootstrap_gen_kernel") {
args = []
}
import("../aot_snapshot.gni")
import("../application_snapshot.gni")
aot_snapshot("gen_kernel") {
application_snapshot("gen_kernel") {
main_dart = "../../pkg/vm/bin/gen_kernel.dart"
deps = [ "../../runtime/vm:vm_platform" ]
output = "$root_gen_dir/gen_kernel_aot.dart.snapshot"
# dartaotruntime has dart_product_config applied to it,
# so it is built in # product mode in both release and
# product builds, and is only built in debug mode in debug
# builds. The following line ensures that the dartaotruntime
# and gen_kernel_aot snapshot in an SDK build are
# always compatible with each other.
force_product_mode = !dart_debug
# NOTE: The output filename must be kept in sync with the output of the
# vm_platform rule.
vm_platform_out =
get_label_info("../../runtime/vm:vm_platform", "root_out_dir")
vm_platform = "$vm_platform_out/vm_platform_strong.dill"
training_args = [
"--platform",
rebase_path(vm_platform, root_build_dir),
rebase_path("../../pkg/vm/bin/gen_kernel.dart", root_build_dir),
"-o -",
]
}