This extends a test in the previous commit to assert that we don't build
extra rustc compilers even when the "extended" option is set to true.
This involved some internal refactoring to have more judicious usage of
`compiler_for`, added in the previous commit, as well.
Various `dist::*` targets were refactored to be parameterized with a
`Compiler` instead of a `stage`/`host`, and then the various parameters
within the `Extended` target were tweaked to ensure that we don't ever
accidentally ask for a stage2 build compiler when we're distributing
something.
This commit furthers the previous one to ensure that we don't build an
extra stage of the compiler in CI. A test has been added to rustbuild to
ensure that this doesn't regress, and then in debugging this test it was
hunted down that the `dist::Std` target was the one erroneously pulling
in the wrong compiler.
The `dist::Std` step was updated to instead account for the "full
bootstrap" or not flag, ensuring that the correct compiler for compiling
the final standard library was used. This was another use of the
`force_use_stage1` function which was in theory supposed to be pretty
central, so existing users were all evaluated and a new function,
`Builder::compiler_for`, was introduced. All existing users of
`force_use_stage1` have been updated to use `compiler_for`, where the
semantics of `compiler_for` are similar to that of `compiler` except
that it doesn't guarantee the presence of a sysroot for the arguments
passed (as they may be modified).
Perhaps one day we can unify `compiler` and `compiler_for`, but the
usage of `Builder::compiler` is so ubiquitous it would take quite some
time to evaluate whether each one needs the sysroot or not, so it's
hoped that can be done in parallel.
Rollup of 4 pull requests
Successful merges:
- #61123 (Allow to specify profiling data output directory as -Zself-profile argument.)
- #61159 (split core::ptr module into multiple files)
- #61164 (rename Scalar::Bits to Scalar::Raw and bits field to data)
- #61250 (Remove special case for *ios* builds in run-make-fulldeps/print-target-list Makefile)
Failed merges:
r? @ghost
The commit should have changed comments as well.
At the time of writting, it passes the tidy and check tool.
Revisions asked by eddyb :
- Renamed of all the occurences of {visit/super}_mir
- Renamed test structures `CachedMir` to `Cached`
Fixing the missing import on `AggregateKind`
Remove special case for *ios* builds in run-make-fulldeps/print-target-list Makefile
Previous `TODO` comment in this file mentions [an issue that was closed](https://github.com/rust-lang/rust/issues/29812), and I was able to confirm locally that provided code in that issue no longer produces an ICE. Discussion on that issue seems to indicate this code was no longer needed as of 1.12.0.
I removed the `*ios*` branch from this `case` statement as it may cause confusion, then removed the case statement entirely as it only had a wildcard branch.
rename Scalar::Bits to Scalar::Raw and bits field to data
Also use this opportunity to seal some abstraction leaks (other modules constructing `Scalar::Bits` directly instead of using a constructor).
r? @oli-obk
Allow to specify profiling data output directory as -Zself-profile argument.
The PR also makes `rustc` include the crate-name (if already available) in the output file name.
r? @wesleywiser
At some point we should add some basic tests for `-Zself-profile`.