blob: 0112e732aa1404e3c7c92a59ecfca27030d47dc3 [file] [log] [blame] [edit]
# Copyright (c) 2024, 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")
template("aot_compile_using_prebuilt_sdk") {
prebuilt_dart_action(target_name) {
forward_variables_from(invoker,
[
"deps",
"pool",
"testonly",
"visibility",
])
inputs = [
invoker.entry_point,
invoker.package_config,
]
outputs = [ invoker.output ]
depfile = invoker.output + ".d"
args = [
"compile",
"exe",
"--packages",
rebase_path(invoker.package_config, root_build_dir),
"-Dsdk_hash=$sdk_hash",
"--depfile",
rebase_path(depfile, root_build_dir),
"-o",
rebase_path(invoker.output, root_build_dir),
rebase_path(invoker.entry_point, root_build_dir),
]
}
}
aot_compile_using_prebuilt_sdk("compile_platform.exe") {
entry_point = "$_dart_root/pkg/front_end/tool/compile_platform.dart"
output = "$root_out_dir/compile_platform.exe"
package_config = "$_dart_root/.dart_tool/package_config.json"
}
aot_compile_using_prebuilt_sdk("gen_kernel.exe") {
entry_point = "$_dart_root/pkg/vm/bin/gen_kernel.dart"
output = "$root_out_dir/gen_kernel.exe"
package_config = "$_dart_root/.dart_tool/package_config.json"
}