Files
sdk/utils/kernel-service/BUILD.gn
T
Siva Chandra 4b73d12082 Link kernel service dill with the command line dart executable.
This linked in kernel service dill file will be used to load the kernel
isolate if the attempt to lookup the kernel service snapshot fails. The
kernel service snapshot is looked up in the following order.

1. If the "--dfe" option is specified, the file specified is used.
2. If the kernel service snapshot is found next to the executable,
then it is used.
3. If the kernel service snapshot is found in the "snapshots" directory
next to the executable, then it is used.

Change-Id: I5a0e757eb27b26a274b22b4bc36350fee59a100f
Reviewed-on: https://dart-review.googlesource.com/32446
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Chandra <sivachandra@google.com>
2018-01-12 20:40:41 +00:00

64 lines
1.9 KiB
Plaintext

# Copyright (c) 2017, 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_host_sdk_toolchain.gni")
import("../application_snapshot.gni")
# TODO: Switch this to use kernel based app-jit snapshot
# when we are ready to switch to the kernel based core snapshots.
application_snapshot("kernel-service") {
main_dart = "../../pkg/vm/bin/kernel_service.dart"
deps = [
"../../runtime/vm:kernel_platform_files($dart_host_toolchain)",
]
training_args = [
"--train",
"file://" + rebase_path("../../pkg/compiler/lib/src/dart2js.dart"),
]
}
copy("copy_kernel_service_snapshot") {
deps = [
":kernel-service",
]
sources = [
rebase_path("$root_gen_dir/kernel-service.dart.snapshot"),
]
outputs = [
"$root_out_dir/kernel-service.dart.snapshot",
]
}
compiled_action("kernel_service_dill") {
deps = [
"../../runtime/vm:vm_legacy_platform",
]
tool = "../../runtime/bin:dart_bootstrap"
kernel_service_script = "../../pkg/vm/bin/kernel_service.dart"
gen_kernel_script = "../../pkg/vm/bin/gen_kernel.dart"
inputs = [
gen_kernel_script,
kernel_service_script,
"$root_out_dir/vm_platform.dill",
]
outputs = [
"$root_gen_dir/kernel_service.dill",
]
# TODO: Switch over to vm_platform_strong.dill and remove the
# flags --no-strong-mode once https://github.com/dart-lang/sdk/issues/31623
# is fixed.
args = [
rebase_path(gen_kernel_script),
"--packages=file:///" + rebase_path("../../.packages"),
"--platform=file:///" + rebase_path("$root_out_dir/vm_platform.dill"),
"--no-aot",
"--no-strong-mode",
"--no-embed-sources",
"--output=" + rebase_path("$root_gen_dir/kernel_service.dill"),
"file:///" + rebase_path(kernel_service_script),
]
}