fx download-toolchain

从 CI 下载预构建的工具链(clang、rust)

usage: fx download-toolchain <toolchain>[:<target>] [...]

Downloads one or more prebuilt toolchains (`clang` or `rust`)
for the current host architecture (${HOST_PLATFORM}) into
`//local/<toolchain>` and prints the GN arguments needed to use them.

Arguments:
  <toolchain>              One of `clang` or `rust`.
                           Downloads the latest green build from toolchain.ci
                           for the current host architecture.
  <toolchain>:<target>     Download `<toolchain>` from a specific build or
                           builder. `<target>` can be:
                             - A LUCI / Milo build URL (e.g.
                               https://ci.chromium.org/ui/p/fuchsia/builders/.../b8666755190352362065/overview
                               or https://ci.chromium.org/b/8666755190352362065)
                             - A Buildbucket build ID (e.g. b8666755190352362065
                               or 8666755190352362065)
                             - A CAS digest (e.g. <sha256>/<size_bytes>)
                             - A LUCI builder URL or builder name (e.g.
                               fuchsia/toolchain.ci/rust_llvm-linux-x64 or
                               rust_llvm-linux-x64), which resolves to the
                               latest green build on that builder.

Examples:
  fx download-toolchain rust
  fx download-toolchain clang rust
  fx download-toolchain \
    clang:https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64/b8666747240201415809/overview \
    rust:https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/rust_llvm-linux-x64/b8666927100188196401/overview

download-toolchain 源代码