[gn] Fix precompile_tools=true

gn_dart_compile_exe.py wrapper stopped working because we rearranged
something in the prebuilt SDK. However we no longer need it because
we can ask `compile exe` itself to produce the depfile.

TEST=manually
R=kustermann@google.com

Change-Id: If5e64ede08b4e146a7bf033e7ef2d1809f40de1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/435500
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
This commit is contained in:
Vyacheslav Egorov
2025-06-18 07:18:22 -07:00
committed by Commit Queue
parent dc0567c02c
commit b0f933facc
2 changed files with 7 additions and 165 deletions
+7 -14
View File
@@ -8,7 +8,7 @@ import("../sdk_args.gni")
_dart_root = get_path_info("..", "abspath")
template("aot_compile_using_prebuilt_sdk") {
action(target_name) {
prebuilt_dart_action(target_name) {
forward_variables_from(invoker,
[
"deps",
@@ -17,31 +17,24 @@ template("aot_compile_using_prebuilt_sdk") {
"visibility",
])
script = "$_dart_root/build/gn_dart_compile_exe.py"
inputs = [
invoker.entry_point,
invoker.package_config,
]
outputs = [ invoker.output ]
depfile = invoker.output + ".d"
# TODO(vegorov): support RBE by using rewrapper script.
args = [
"--dart-sdk",
rebase_path("$_dart_root/tools/sdks/dart-sdk", root_build_dir),
"--sdk-hash",
"$sdk_hash",
"--entry-point",
rebase_path(invoker.entry_point, root_build_dir),
"--output",
rebase_path(invoker.output, root_build_dir),
"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),
]
}
}