| # Copyright 2021 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| # Defines the configuration of RBE and related global variables. |
| |
| # Prebuilt RBE binaries |
| rbe_common_tools = [ |
| "//prebuilt/proprietary/third_party/reclient/$host_platform/bootstrap", |
| "//prebuilt/proprietary/third_party/reclient/$host_platform/reproxy", |
| "//prebuilt/proprietary/third_party/reclient/$host_platform/rewrapper", |
| ] |
| |
| rewrapper_config_file = "//build/rbe/fuchsia-rewrapper.cfg" |
| reproxy_config_file = "//build/rbe/fuchsia-reproxy.cfg" |
| |
| rbe_common_configs = [ |
| rewrapper_config_file, |
| reproxy_config_file, |
| ] |
| |
| # Toolchain-agnostic RBE scripts and configuration. |
| # This is used by both the shell and Python implementations. |
| rbe_common_scripts = [ "//build/rbe/fuchsia-reproxy-wrap.sh" ] |
| |
| rbe_common_py_scripts = [ |
| "//build/rbe/remote_action.py", |
| "//build/rbe/cl_utils.py", |
| "//build/rbe/depfile.py", |
| "//build/rbe/fuchsia.py", |
| "//build/rbe/output_leak_scanner.py", |
| ] |
| |
| rbe_common_sh_tools = [ "//build/rbe/fuchsia-rbe-action.sh" ] |
| |
| rustc_remote_wrapper = "//build/rbe/rustc-remote-wrapper.sh" |
| |
| rustc_remote_wrapper = "//build/rbe/rustc_remote_wrapper.py" |
| |
| # Dependencies for all RBE-enabled rust actions. |
| rust_rbe_deps = |
| rbe_common_tools + rbe_common_scripts + rbe_common_py_scripts + [ |
| # prebuilt_tool_remote_wrapper is needed for remote stripping binaries, |
| # which is a second remote action inside a rust executable action, |
| # in build/toolchain/clang_toolchain.gni. |
| "//build/rbe/prebuilt_tool_remote_wrapper.py", |
| "//build/rbe/rustc.py", |
| rustc_remote_wrapper, |
| ] |
| |
| cxx_remote_wrapper = "//build/rbe/cxx_remote_wrapper.py" |
| |
| # Dependencies for all RBE-enabled C++ actions. |
| cxx_rbe_deps = rbe_common_tools + rbe_common_scripts + rbe_common_py_scripts + [ |
| "//build/rbe/cxx.py", |
| cxx_remote_wrapper, |
| ] |
| |
| prebuilt_tool_remote_wrapper = "//build/rbe/prebuilt_tool_remote_wrapper.py" |
| |
| declare_args() { |
| ######################### |
| ### Rust RBE controls ### |
| ######################### |
| |
| # Set to true to enable distributed compilation of Rust using RBE. |
| rust_rbe_enable = false |
| |
| # One of: |
| # |
| # * "remote": Execute action remotely on cache miss. |
| # The remote cache is always updated with this result. |
| # |
| # * "local": Lookup action in the remote cache, but execute action |
| # locally on cache miss. The locally produced result is |
| # not uploaded to the remote cache. |
| # |
| # * "remote_local_fallback": Execute action remotely first. |
| # If that fails, run locally instead. The locally produced |
| # results are not uploaded to the remote cache. |
| # |
| # * "racing": Race local vs. remote execution, take the first to finish. |
| # |
| # (There are other rewrapper options that are not exposed.) |
| rust_rbe_exec_strategy = "remote" |
| |
| # Run one of the more expensive checks, intended for CI. |
| # All of these require rust_rbe_enable=true. |
| # |
| # One of: |
| # |
| # * "none": No additional check. |
| # |
| # * "determinism": |
| # Check of determinism of rustc targets by running locally twice |
| # and comparing outputs, failing if any differences are found. |
| # Even though this check doesn't involve RBE, it uses the same |
| # wrapper script, which knows what output files to expect and |
| # compare. |
| # |
| # Build outputs that depend on time are discouraged because they |
| # impact caching. |
| # If your result depends on the current time, this check will |
| # definitely fail. If it depends on only the date, there is still |
| # a nonzero chance of failure, if the rerun falls on the next day. |
| # |
| # * "consistency": |
| # Check consistency between local and remote rust compiles, |
| # by running both and comparing results. |
| # |
| rust_rbe_check = "none" |
| |
| # Controls whether or not to download (often large) unstripped Rust |
| # binaries. When downloading is disabled, the build produces stubs |
| # that be used to retrieve remote artifacts later using build/rbe/dlwrap.py. |
| rust_rbe_download_unstripped_binaries = true |
| |
| ######################## |
| ### C++ RBE controls ### |
| ######################## |
| |
| # Set to true to enable distributed compilation of C++ using RBE. |
| # Enabling this takes precedence over `use_goma`. |
| cxx_rbe_enable = false |
| |
| # One of: |
| # |
| # * "remote": Execute action remotely on cache miss. |
| # The remote cache is always updated with this result. |
| # |
| # * "local": Lookup action in the remote cache, but execute action |
| # locally on cache miss. The locally produced result is |
| # not uploaded to the remote cache. |
| # |
| # * "remote_local_fallback": Execute action remotely first. |
| # If that fails, run locally instead. The locally produced |
| # result are not uploaded to the remote cache. |
| # |
| # * "racing": Race local vs. remote execution, take the first to finish. |
| # |
| # (There are other rewrapper options that are not exposed.) |
| cxx_rbe_exec_strategy = "remote_local_fallback" |
| } |