Files
sdk/utils/gen_kernel/BUILD.gn
T
Ryan Macnak ab4f9351b1 Rename vm_platform_strong.dill to vm_platform.dill.
The name has always been annoying because it did not add strong typing. And now there aren't variants of the VM platform to distinguish.

Leave a copy at the old name to not immediately break illegal uses.

TEST=ci
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,flutter-frontend-try,flutter-linux-try
Change-Id: Ie76fa7f16940aa1ba8d582eb5197f0ae55dc8938
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429828
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2025-06-16 18:33:38 -07:00

58 lines
1.8 KiB
Plaintext

# Copyright (c) 2019, 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("../../runtime/runtime_args.gni")
import("../../sdk_args.gni")
_dart_root = get_path_info("../..", "abspath")
prebuilt_dart_action("bootstrap_gen_kernel") {
deps = [
"$_dart_root/runtime/vm:kernel_platform_files($host_toolchain)",
"$_dart_root/runtime/vm:vm_platform",
]
gen_kernel_script = "$_dart_root/pkg/vm/bin/gen_kernel.dart"
platform_dill = "$root_out_dir/vm_platform.dill"
package_config = rebase_path("$_dart_root/.dart_tool/package_config.json")
inputs = [
gen_kernel_script,
platform_dill,
package_config,
]
output = "$target_gen_dir/bootstrap_gen_kernel.dill"
outputs = [ output ]
depfile = "$output.d"
vm_args = [
"--snapshot-kind=kernel",
"--snapshot=" + rebase_path(output, root_build_dir),
"--depfile=" + rebase_path(depfile, root_build_dir),
# Ensure gen_kernel.dart will use this SDK hash when consuming/producing kernel.
"-Dsdk_hash=$sdk_hash",
"--packages=" + rebase_path(package_config, root_build_dir),
]
script = gen_kernel_script
args = []
}
import("../aot_snapshot.gni")
aot_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
}