| Age | Commit message (Collapse) | Author | Lines |
|
Move `mod cargo` below the import statements
Just caught that during a [bootstrap reading-club](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/.5BBRC.5D.20How.20do.20Steps.20and.20Paths.20work.3F) session.
|
|
bootstrap: Add more comments to some of the test steps
Some of the test steps have names that don't clearly indicate what they actually do.
While there is ongoing experimental work to actually rename the steps (e.g. #135071), that's dependent on figuring out what the new names should actually be. In the meantime, we can still improve things by adding comments to help describe the steps, which will remain useful even after any renaming.
|
|
|
|
|
|
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
This reverts commit f5577a8174685aca342b9189e625648f25a23a20.
|
|
This reverts commit 2316749ca954030afed6145342808a8c1ae29fac.
|
|
|
|
bootstrap: Build jemalloc with support for 64K pages
By default, jemalloc is built to only support the same page size as the host machine. Set an env variable so that jemalloc is built with support for page sizes up to 64K regardless of the host machine.
r? `@Kobzol`
Resolves #134563
Potentially resolves #133748 (needs verification)
----
Results from local rustc-perf testing below, within 0.5% on every metric except max-rss.
AArch64:

x86_64:

|
|
By default, jemalloc is built to only support the same page size as the
host machine. For AArch64 targets, set an env variable so that jemalloc
is built with support for page sizes up to 64K regardless of the host machine.
|
|
bootstrap: Consolidate coverage test suite steps into a single step
Now that I have more understanding of bootstrap steps, and a renewed distaste for unnecessary macros, I have managed to express the subtleties of the `tests/coverage` test suite in a single step defined in ordinary code, with no need for helper macros.
Deciding which modes to run is still a bit clunky due to limitations in existing ShouldRun/PathSet APIs, but I think it's a net improvement over having to declare several different steps to handle the suite path and aliases.
The interaction with `--skip` isn't as nice as I'd like, but all of the known limitations are limitations that already existed in the previous implementation.
One minor change is that by default compiletest is now invoked in `coverage-run` mode even when cross-compiling. However, in that situation compiletest still knows that it should skip all of the individual coverage-run tests.
r? jieyouxu (or reassign)
|
|
|
|
|
|
Rollup of 6 pull requests
Successful merges:
- #135046 (turn rustc_box into an intrinsic)
- #135061 (crashes: add latest batch of tests)
- #135070 (std: sync to dep versions of backtrace)
- #135088 (Force code generation in assembly generation smoke-tests)
- #135091 (Bump backtrace to 0.3.75)
- #135094 (bootstrap: If dir_is_empty fails, show the non-existent directory path)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
r=jieyouxu
bootstrap: If dir_is_empty fails, show the non-existent directory path
This should help when trying to debug issues.
|
|
|
|
bootstrap: support `./x check run-make-support`
Mostly for working on `src/tools/run-make-support` locally.
|
|
Allow using self-contained LLD in bootstrap
In https://github.com/rust-lang/rust/pull/116278, I added a `"self-contained"` mode to the `rust.use-lld` bootstrap option, which was designed for using the built-in LLD for linking compiler artifacts. However, this was later reverted in https://github.com/rust-lang/rust/pull/118810.
This PR brings the old logic back, which switches LLD in bootstrap from `-fuse-ld=lld` to [MCP510](https://github.com/rust-lang/compiler-team/issues/510)'s way of passing linker flags to enable LLD (both external and self-contained). So this does two changes:
1) Goes from `-fuse-ld=lld` to MCP510
2) Actually makes it possible to use the self-contained LLD to compile compiler artifacts
Regarding the second commit: Since https://github.com/rust-lang/rust/pull/86113, we have been passing `-fuse-ld=lld` as a target flag to all tests when `use-lld = true` is enabled. This kind of worked for all tests, since it was just a linker argument, which has bypassed any compiler checks, and probably resulted only in some warning if the given target linker didn't actually support LLD. However, after the first commit, some tests actually start failing with this approach:
```
error: linker flavor `gnu-lld-cc` is incompatible with the current target
|
= note: compatible flavors are: llbc, ptx
```
So the second commit removes the passing of LLD flags as target flags to tests. I don't think that it's a good idea to pass specific compiler flags to all tests unconditionally, tbh. The doctest command from #86113 doesn't go through compiletest anymore, and doctests should be quite a lot faster since https://github.com/rust-lang/rust/pull/126245 in general.
CC `@the8472`
If someone has a beefy machine, it would be nice to test whether this doesn't regress test execution speed. How to do that:
1) Enable `rust.use-lld = true` and `rust.lld = true` in `config.toml`
2) Benchmark `./x test tests/ui --force-rerun` between `master` and this PR
Once this is tested in the wild, I would like to make the self-contained LLD the default in CI, hopefully to make CI builds faster.
r? `@onur-ozkan`
|
|
This should help when trying to debug issues.
|
|
refactor bootstrap path resolution
Previously we removed paths as soon as we found the first intersection, which made it impossible to find other intersecting paths (and that is the reason of https://github.com/rust-lang/rust/issues/135022).
This patch changes that by marking the intersecting paths instead, so we can collect them all and remove them together when needed. Which means, `x build compiler` would compile anything that ends or starts with `"compiler"` instead of picking the first matching `Step` from `builder::get_step_descriptions`.
Fixes https://github.com/rust-lang/rust/issues/135022
|
|
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
Make the `test` cfg a userspace check-cfg
This PR implements MCP https://github.com/rust-lang/compiler-team/issues/785, which makes the `test` cfg a "userspace" check-cfg, i.e. no longer included in the well known cfg list.
Things to do:
- [x] Accept the MCP (https://github.com/rust-lang/compiler-team/issues/785#issuecomment-2424121886)
- [x] Mark `test` in Cargo (https://github.com/rust-lang/cargo/pull/14963)
`@rustbot` labels +S-waiting-on-MCP +F-check_cfg
r? `@petrochenkov`
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
This reverts commit 552c1f5f45ec8b8cb5c9427754a7c3d16ca9f741.
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
Previously we removed paths as soon as we found the first intersection, which made
it impossible to find other intersecting paths. This patch changes that by marking
the intersecting paths instead, so we can collect them all and remove them together
when needed.
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
Rollup of 5 pull requests
Successful merges:
- #135016 (Ping me for rustc-dev-guide subtree changes on this repo)
- #135027 (Remove range-metadata amdgpu workaround)
- #135029 (Update mailmap)
- #135033 (try to dedup me in the mailmap)
- #135035 (Fix formatting command)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Fix formatting command
The formatting command previously had two issues:
- if rustfmt failed, it would print the command invocation. this is unnecessarily noisy
- there was a race condition that lead to orphan rustfmts that would print their output after bootstrap exited
We fix this by
- removing the printing, it's not really useful
- threading failure through properly instead of just yoloing exit(1)
|
|
The formatting command previously had two issues:
- if rustfmt failed, it would print the command invocation. this is
unnecessarily noisy
- there was a race condition that lead to orphan rustfmts that would
print their output after bootstrap exited
We fix this by
- removing the printing, it's not really useful
- threading failure through properly instead of just yoloing exit(1)
|
|
bootstrap: Overhaul and simplify the `tool_extended!` macro
Similar to #134950, but for the macro that declares build steps for some tools.
The main changes are:
- Removing some functionality that isn't needed by any of the tools currently using the macro
- Moving some code out of the macro and into ordinary helper functions
- Switching to one macro invocation per tool, and struct-like syntax so that rustfmt will format them
There should be no functional change.
|
|
|
|
The PathSet prefix matching unfortunately also has implications for `./x
build compiler`, because the path filter `"compiler"` gets consumed by
`compile::Rustc` step first after PathSet prefix matching, whereas
before PathSet prefix matching, the later-registered `compile::Assemble`
step would've consumed the `"compiler"` path filter.
This merely papers over the issue with PathSet prefix handling to
unblock contributors for using `./x build compiler`.
|
|
|
|
Using struct-like syntax allows rustfmt to format macro invocations, instead of
giving up and ignoring them.
Using a separate macro invocation per tool makes the macro slightly simpler,
and isolates syntax errors to individual invocations.
|
|
|
|
|
|
|
|
This field was introduced in #48097 to support the "clippy" feature of RLS.
|
|
Turn rustc-dev-guide into a Josh subtree
Discussed on [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/196385-t-compiler.2Fwg-rustc-dev-guide/topic/a.20move.20to.20main.20repo.20.28rust-lang.2Frust.29).
Accompanying rustc-dev-guide PR: https://github.com/rust-lang/rustc-dev-guide/pull/2183
I didn't create a bootstrap step for rustc-dev-guide yet, because the rustc-dev-guide version that we currently use in this repo doesn't have linkcheck enabled and that fails tests.
The subtree starts with commit [ad93c5f1c49f2aeb45f7a4954017b1e607df9f5e](https://github.com/rust-lang/rustc-dev-guide/commit/ad93c5f1c49f2aeb45f7a4954017b1e607df9f5e).
What I did:
```
export DIR=src/doc/rustc-dev-guide
# Remove submodule
git submodule status ${DIR}
git submodule deinit ${DIR}
git rm -r --cached ${DIR}
rm -rf ${DIR}
# Remove rustc-dev-guide from .gitmodules
git commit -m"Removed `${DIR}` submodule"
# Import history with josh
git fetch https://github.com/rust-lang/rustc-dev-guide ad93c5f1c49f2aeb45f7a4954017b1e607df9f5e
josh-filter ':prefix=src/doc/rustc-dev-guide' FETCH_HEAD
git merge --allow-unrelated FILTERED_HEAD
# A few follow-up cleanup commits
```
r? ehuss
|
|
handle submodules automatically on `doc` steps
Helps to make `doc` macros less complicated.
|
|
Not all targets support these flags, so we cannot just pass them to the tests unconditionally. Before, we were using a linker arg (`-Clink-arg=-fuse-ld=lld`), which circumvented this in a hacky way.
|
|
"self-contained"` is used
Before, we just used the global `lld` anyway.
|
|
|
|
It was not working for a long time.
|
|
|
|
bootstrap: Overhaul and simplify the `tool_check_step!` macro
Main changes:
- Pull most of `run` out of the macro and into a regular helper function
- Reduce the number of redundant/unnecessary macro arguments
- Switch to struct-like syntax so that optional arguments are clearer, and so that rustfmt is happy
~~The one “functional” change is that the `-check.stamp` files now get their name from the final path segment, instead of the struct name; in practice this means that they now contain more hyphens in some cases. As far as I'm aware, the exact filename doesn't matter so this should be fine.~~ (that change has been removed from this PR)
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|