Skip to content

Commit

Permalink
Version 3.5.0-58.0.dev
Browse files Browse the repository at this point in the history
Merge 1b695dd into dev
  • Loading branch information
Dart CI committed Apr 13, 2024
2 parents 5d469f5 + 1b695dd commit 604e28a
Show file tree
Hide file tree
Showing 20 changed files with 1,023 additions and 27 deletions.
47 changes: 39 additions & 8 deletions build/dart/dart_action.gni
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ import("../executable_suffix.gni")
# in a Dart checkout, this will be "//". In a client repo it might be
# "//third_party/dart".
_dart_root = get_path_info("../..", "abspath")
_is_dart = _dart_root == get_path_info("//", "abspath")

if (_is_dart) {
import("../toolchain/rbe.gni")
}

template("_compiled_action") {
assert(defined(invoker.tool), "tool must be defined for $target_name")
Expand Down Expand Up @@ -82,10 +87,23 @@ template("_compiled_action") {

# The "compiled_action" argument to gn_run_binary.py indicates that
# it will exit with a non-zero status when the target program does.
args = [
"compiled_action",
rebase_path(host_executable, root_build_dir),
] + invoker.args
args = [ "compiled_action" ]

if (_is_dart && use_rbe &&
(target_os == rbe_os ||
(target_os == "android" && rbe_os == "linux")) &&
target_cpu == rbe_cpu) {
args += [
"/usr/bin/python3",
rebase_path("//build/rbe/rewrapper_dart.py", root_build_dir),
] + rewrapper_args +
[
"--exec_strategy=" + rbe_expensive_exec_strategy,
"--",
]
}

args += [ rebase_path(host_executable, root_build_dir) ] + invoker.args
}
}

Expand Down Expand Up @@ -122,10 +140,23 @@ template("_prebuilt_tool_action") {
inputs += [ invoker.packages ]
}

args = [
"compiled_action",
rebase_path(invoker.binary, root_build_dir),
] + vm_args
args = [ "compiled_action" ]

if (_is_dart && use_rbe &&
(target_os == rbe_os ||
(target_os == "android" && rbe_os == "linux")) &&
target_cpu == rbe_cpu) {
args += [
"/usr/bin/python3",
rebase_path("//build/rbe/rewrapper_dart.py", root_build_dir),
] + rewrapper_args +
[
"--exec_strategy=" + rbe_expensive_exec_strategy,
"--",
]
}

args += [ rebase_path(invoker.binary, root_build_dir) ] + vm_args
if (defined(invoker.packages)) {
args += [ "--packages=" + rebase_path(invoker.packages, root_build_dir) ]
}
Expand Down
Loading

0 comments on commit 604e28a

Please sign in to comment.