Closed
Description
The codegen
profile is intended not just for people working on LLVM itself, but also anyone who touches codegen but not LLVM. For example, anyone who modifies rustc_codegen_ssa
or rustc_codegen_llvm
is only changing the IR we send to LLVM, not LLVM itself. We should keep llvm.debug-assertions
on for them but not for profile = "compiler"
, but ideally we wouldn't build LLVM from source if it's unmodified.
@majaha points out some things that we should fix before enabling that option by default for the codegen
profile:
### Tasks
- [ ] Add a new `if-unchanged` option for `download-ci-llvm`. This should be modeled off the existing option for `download-rustc`, and imply `if-available` (i.e. we should treat this the same as `false` for tier 3 platforms). It may be as simple as extracting out the same `last_modified_commit` function used in https://github.com/rust-lang/rust/blob/8ad89068e2558940b4184d46763ff9c6b325883b/src/bootstrap/min_config.rs#L178-L180 and calling it with `["src/llvm-project"]`, then adding the option in config.toml.
- [ ] The downloadable llvm for this profile should include all the build artifacts that you get with a source build, so that the build dir is left in a state _as if_ you've just run a full source build. See https://github.com/rust-lang/rust/pull/110074#issuecomment-1500888030 for a full list of artifacts that should be included.
- [ ] The submodule should be downloaded during `./x.py setup` after you select the `codegen` profile.
Originally posted by @jyn514 in #110074 (comment)
Metadata
Metadata
Assignees
Labels
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Makes things more difficult for new or seasoned contributors to RustCategory: An issue proposing an enhancement or a PR with one.Call for participation: Medium difficulty. Experience needed to fix: Intermediate.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)