blob: df39bb9ef0fb74de32eeaa9cc3994df5beea93db [file] [log] [blame]
# 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/dart_action.gni")
import("../../build/dart/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 = [
"$root_gen_dir/kernel-service.dart.snapshot",
]
outputs = [
"$root_out_dir/kernel-service.dart.snapshot",
]
}
application_snapshot("frontend_server") {
main_dart = "../../pkg/vm/bin/frontend_server_starter.dart"
deps = [
"../../runtime/vm:kernel_platform_files($dart_host_toolchain)",
]
sdk_root = rebase_path("$root_out_dir")
training_args = [
"--train",
"--sdk-root=$sdk_root/",
"--platform=$sdk_root/vm_platform.dill",
]
output = "$root_out_dir/frontend_server.dart.snapshot"
}
prebuilt_dart_action("kernel_service_dill") {
deps = [
"../../runtime/vm:vm_legacy_platform",
]
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",
]
output = "$root_gen_dir/kernel_service.dill"
outputs = [
output,
]
# Enable this when the prebuilt SDK rolls to pick up the fix for
# Issue #34026.
# depfile = "$target_gen_dir/kernel_service_dill.d"
# abs_depfile = rebase_path(depfile)
# abs_output = rebase_path(output)
# vm_args = [
# "--depfile=$abs_depfile",
# "--depfile_output_filename=$abs_output",
# ]
script = gen_kernel_script
# 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 = [
"--packages=" + rebase_path("../../.packages"),
"--platform=" + 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"),
rebase_path(kernel_service_script),
]
}