about summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/src/errors.rs
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-03-11 19:35:29 +0100
committerGitHub <noreply@github.com>2025-03-11 19:35:29 +0100
commitc007d0af6ac051fa4f6a80a9366a27037b028770 (patch)
treeeceddf4ac44b7225be9b8e4b3f7315b7130bef1c /compiler/rustc_builtin_macros/src/errors.rs
parent9746ac5c2f59b557e15b3c48e2b2b0cf4e17b64a (diff)
parent75a69a48f3aebaaa7cb3ce2ffcd3816f10895f70 (diff)
downloadrust-c007d0af6ac051fa4f6a80a9366a27037b028770.tar.gz
rust-c007d0af6ac051fa4f6a80a9366a27037b028770.zip
Rollup merge of #138051 - Kobzol:download-ci-gcc, r=onur-ozkan
Add support for downloading GCC from CI

This PR adds a new bootstrap config section called `gcc` and implements a single config `download-ci-gcc`. Its behavior is similar to `download-ci-llvm`. Since https://github.com/rust-lang/rust/pull/137667, we distribute a CI component that contains the prebuilt `libgccjit.so` library on x64 Linux. With `download-ci-gcc`, this component is downloaded from CI to avoid building GCC locally.

This is an MVP of this functionality, designed for local usage. This PR does not enable this functionality on the LLVM 18 PR CI job which builds `cg_gcc`, and does not implement more complex detection logic. It simply uses `false` (build locally) or `true` (download from CI if you're on the right target, if CI download fails, then bootstrap fails).

The original LLVM CI download functionality has a lot of features and complexity, which we don't need for GCC (yet). I don't like how the LLVM CI stuff is threaded through multiple parts of bootstrap, so with GCC I would like to take a more centralized approach, where the `build::Gcc` step handles download from CI internally. This means that:
- For the rest of bootstrap, it should be transparent whether GCC was built locally or downloaded from CI.
- GCC is not downloaded eagerly unless you actually requested GCC (either you requested `x build gcc` or you asked to build/test the GCC backend).

This approach will require some modifications once we extend this feature, but so far I like this approach much more than putting this stuff into `Config[::parse]`, which already does a ton of stuff that it arguably shouldn't (but it's super difficult to extract its logic out).

This PR is an alternative to https://github.com/rust-lang/rust/pull/130749, which did a more 1:1 copy of the `download-ci-llvm` logic.

r? ``@onur-ozkan``
Diffstat (limited to 'compiler/rustc_builtin_macros/src/errors.rs')
0 files changed, 0 insertions, 0 deletions