Skip to content

Commit

Permalink
Adds RBE local and remote wrappers for Linux and Android (#854)
Browse files Browse the repository at this point in the history
For flutter/flutter#147750. This change also
disables remote linking in anticipation of changing to differently sized
workers in the worker pool.

Validated in flutter/engine#52675.
  • Loading branch information
zanderso authored May 9, 2024
1 parent b55755a commit 70a4231
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 8 deletions.
22 changes: 18 additions & 4 deletions build/toolchain/android/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,26 @@ template("android_toolchain") {
compiler_prefix = "$goma_dir/gomacc "
link_prefix = "$goma_dir/gomacc "
} else if (use_rbe) {
compiler_args =
rewrapper_command + [ "--labels=type=compile,compiler=clang,lang=cpp " ]
link_args = rewrapper_command + [ "--labels=type=link,tool=clang " ]
remote_wrapper = ""
if (host_os == "linux") {
remote_wrapper =
rebase_path("//flutter/build/rbe/remote_wrapper_linux.sh", root_build_dir)
} else if (host_os == "mac") {
remote_wrapper =
rebase_path("//flutter/build/rbe/remote_wrapper.sh", root_build_dir)
} else {
assert(false, "Unknown host")
}
local_wrapper =
rebase_path("//flutter/build/rbe/local_wrapper.sh", root_build_dir)
compiler_args = rewrapper_command + [
"--remote_wrapper=$remote_wrapper",
"--local_wrapper=$local_wrapper",
"--labels=type=compile,compiler=clang,lang=cpp ",
]
assembler_prefix = ""
compiler_prefix = string_join(" ", compiler_args)
link_prefix = string_join(" ", link_args)
link_prefix = ""
} else if (use_ccache) {
assembler_prefix = "ccache "
compiler_prefix = "ccache "
Expand Down
14 changes: 10 additions & 4 deletions build/toolchain/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,17 @@ if (use_goma) {
compiler_prefix = "$goma_dir/gomacc "
link_prefix = "$goma_dir/gomacc "
} else if (use_rbe) {
compiler_args =
rewrapper_command + [ "--labels=type=compile,compiler=clang,lang=cpp " ]
link_args = rewrapper_command + [ "--labels=type=link,tool=clang " ]
remote_wrapper =
rebase_path("//flutter/build/rbe/remote_wrapper_linux.sh", root_build_dir)
local_wrapper =
rebase_path("//flutter/build/rbe/local_wrapper.sh", root_build_dir)
compiler_args = rewrapper_command + [
"--remote_wrapper=$remote_wrapper",
"--local_wrapper=$local_wrapper",
"--labels=type=compile,compiler=clang,lang=cpp ",
]
compiler_prefix = string_join(" ", compiler_args)
link_prefix = string_join(" ", link_args)
link_prefix = ""
} else if (use_ccache) {
compiler_prefix = "ccache "
link_prefix = "ccache "
Expand Down

0 comments on commit 70a4231

Please sign in to comment.