tree: d367a17c19eee7246c9fed3673336ee0fcfabaee [path history] [tgz]
  1. proto/
  2. action_diff.py
  3. action_diff_test.py
  4. BUILD.gn
  5. cl_utils.py
  6. cl_utils_test.py
  7. common-setup.sh
  8. cxx-remote-wrapper.sh
  9. cxx-swap-remote-compiler.sh
  10. cxx.py
  11. cxx_remote_wrapper.py
  12. cxx_remote_wrapper_test.py
  13. cxx_test.py
  14. depfile.py
  15. depfile_test.py
  16. detail-diff.sh
  17. dlwrap.py
  18. dlwrap_test.py
  19. fuchsia-rbe-action.sh
  20. fuchsia-reproxy-wrap.sh
  21. fuchsia-reproxy.cfg
  22. fuchsia-rewrapper.cfg
  23. fuchsia.py
  24. fuchsia_test.py
  25. log-it.sh
  26. output-scanner.sh
  27. output_leak_scanner.py
  28. output_leak_scanner_test.py
  29. pb_message_util.py
  30. pb_message_util_test.py
  31. prebuilt_tool_remote_wrapper.py
  32. prebuilt_tool_remote_wrapper_test.py
  33. python_with_pb_test.sh
  34. README.md
  35. relativize_args.py
  36. relativize_args_test.py
  37. remote_action.py
  38. remote_action_test.py
  39. remotetool.py
  40. remotetool.sh
  41. remotetool_test.py
  42. reproxy_logs.py
  43. reproxy_logs_test.py
  44. rustc-remote-wrapper.sh
  45. rustc.py
  46. rustc_remote_wrapper.py
  47. rustc_remote_wrapper_test.py
  48. rustc_test.py
  49. textpb.py
  50. textpb_test.py
  51. upload_reproxy_logs.py
  52. upload_reproxy_logs_test.py
build/rbe/README.md

This directory contains support for building the Fuchsia tree with build actions running on RBE (remote build execution).

Remote execution wrappers

The top-level remote execution wrappers are used as command prefixes:

  • cxx_remote_wrapper.py: prefix wrapper for remote compiling C++
  • rustc_remote_wrapper.py: prefix wrapper for remote compiling Rust
    • Detects and gathers all inputs and tools needed for remote compiling.
    • Detects extra outputs to download produced by remote compiling.
  • remote_action.py: prefix wrapper for generic remote actions
    • Exists as standalone wrapper and library.
    • Includes detailed diagnostics for certain error conditions.
    • Includes limited fault-tolerance and retries.
    • The C++ and Rust wrappers inherit all of the features of this generic script.
  • fuchsia-reproxy-wrap.sh: automatically start/shutdown reproxy (needed by rewrapper) around any command. Used by fx build.

More details can be found by running with --help.

Support scripts

  • cl_utils.py: generic command-line operation library
  • cxx.py: for understanding structure of C/C++ compile commands
  • fuchsia.py: Fuchsia-tree specific directory layouts and conventions. Parties interested in re-using wrapper scripts found here should expect to replace this file.
  • output_leak_scanner.py: Check that commands and outputs do not leak the name of the build output directory, for better caching outcomes.
  • relativize_args.py: Attempt to transform commands with absolute paths into equivalent commands with relative paths. This can be useful for build systems that insist on absolute paths, like cmake.
  • rustc.py: for understanding structure of rustc compile commands

Configurations

  • fuchsia-rewrapper.cfg: rewrapper configuration
  • fuchsia-reproxy.cfg: reproxy configuration

GN files

  • build/toolchain/rbe.gni: global args.gn variables for RBE

  • build/toolchain/clang_toolchain.gni: uses RBE wrappers depending on configuration

  • build/rust/rustc_*.gni: uses RBE wrappers depending on configuration

Metrics and logs

  • upload_reproxy_logs.py: pushes RBE metrics and detailed logs to BigQuery.

    • This can be enabled by fx build-metrics.
  • pb_message_util.py: library for translating protobufs to JSON