Skip to content

Commit b0f933f

Browse files
mralephCommit Queue
authored andcommitted
[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 [email protected] Change-Id: If5e64ede08b4e146a7bf033e7ef2d1809f40de1f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/435500 Reviewed-by: Martin Kustermann <[email protected]> Commit-Queue: Slava Egorov <[email protected]>
1 parent dc0567c commit b0f933f

File tree

2 files changed

+7
-165
lines changed

2 files changed

+7
-165
lines changed

build/gn_dart_compile_exe.py

Lines changed: 0 additions & 151 deletions
This file was deleted.

utils/BUILD.gn

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import("../sdk_args.gni")
88
_dart_root = get_path_info("..", "abspath")
99

1010
template("aot_compile_using_prebuilt_sdk") {
11-
action(target_name) {
11+
prebuilt_dart_action(target_name) {
1212
forward_variables_from(invoker,
1313
[
1414
"deps",
@@ -17,31 +17,24 @@ template("aot_compile_using_prebuilt_sdk") {
1717
"visibility",
1818
])
1919

20-
script = "$_dart_root/build/gn_dart_compile_exe.py"
21-
2220
inputs = [
2321
invoker.entry_point,
2422
invoker.package_config,
2523
]
26-
2724
outputs = [ invoker.output ]
28-
2925
depfile = invoker.output + ".d"
3026

31-
# TODO(vegorov): support RBE by using rewrapper script.
3227
args = [
33-
"--dart-sdk",
34-
rebase_path("$_dart_root/tools/sdks/dart-sdk", root_build_dir),
35-
"--sdk-hash",
36-
"$sdk_hash",
37-
"--entry-point",
38-
rebase_path(invoker.entry_point, root_build_dir),
39-
"--output",
40-
rebase_path(invoker.output, root_build_dir),
28+
"compile",
29+
"exe",
4130
"--packages",
4231
rebase_path(invoker.package_config, root_build_dir),
32+
"-Dsdk_hash=$sdk_hash",
4333
"--depfile",
4434
rebase_path(depfile, root_build_dir),
35+
"-o",
36+
rebase_path(invoker.output, root_build_dir),
37+
rebase_path(invoker.entry_point, root_build_dir),
4538
]
4639
}
4740
}

0 commit comments

Comments
 (0)