f9c68a5679
Most of these arguments are flowing through to a `--packages` argument which allows passing the `package_config.json` file. In the long term we should remove the `.packages` file entirely. TEST=None, the change should have no visible impact. Change-Id: I60a8b175d5e217a85588bbcb91cc5095514066b4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211503 Auto-Submit: Nate Bosch <nbosch@google.com> Commit-Queue: Nate Bosch <nbosch@google.com> Reviewed-by: Kevin Moore <kevmoo@google.com> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
60 lines
1.7 KiB
Plaintext
60 lines
1.7 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("../../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_strong.dill"
|
|
dot_packages = rebase_path("$_dart_root/.dart_tool/package_config.json")
|
|
|
|
inputs = [
|
|
gen_kernel_script,
|
|
platform_dill,
|
|
dot_packages,
|
|
]
|
|
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),
|
|
|
|
# Ensure gen_kernel.dart will use this SDK hash when consuming/producing kernel.
|
|
"-Dsdk_hash=$sdk_hash",
|
|
|
|
"--packages=" + rebase_path(dot_packages),
|
|
]
|
|
script = gen_kernel_script
|
|
args = []
|
|
}
|
|
|
|
import("../application_snapshot.gni")
|
|
|
|
application_snapshot("gen_kernel") {
|
|
main_dart = "../../pkg/vm/bin/gen_kernel.dart"
|
|
deps = [ "../../runtime/vm:vm_platform" ]
|
|
|
|
# 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),
|
|
rebase_path("../../pkg/vm/bin/gen_kernel.dart"),
|
|
"-o -",
|
|
]
|
|
}
|