| Age | Commit message (Collapse) | Author | Lines |
|
i686-apple-darwin should use `-arch i386` instead of `-arch i686`
|
|
|
|
Rollup of 7 pull requests
Successful merges:
- #96584 (Fix `x setup -h -v` should work)
- #105420 (Remove dead code after destination propagation)
- #105844 (Make the x tool use the x and x.ps1 scripts)
- #105854 (remove redundant clone)
- #105858 (Another `as_chunks` example)
- #105870 (avoid .into() conversion to identical types)
- #105875 (don't destuct references just to reborrow)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
Fix `x setup -h -v` should work
r? `@jyn514`
I have to convert profile to path and back in order to remove special-casing in bootstrap. I also check for `dry_run` so that `config.toml` and/ or `.git/hooks/pre-push` will not be created if `--dry-run` is specified.
Please help me see if this is ok, thanks alot!
|
|
Run `x test tidy` sooner in mingw-check
It takes less time to run than the other tests and is more likely to fail. `expand-yaml-anchors` is still run first to make sure the CI files are internally consistent.
Note that changing to `--stage 0` doesn't actually do anything since bootstrap tools are always built with the bootstrap compiler, this just makes it less confusing.
cc https://github.com/rust-lang/rust/pull/105058/commits/83bab41b5b2d4752d187dd91b05c88ac74cf3783
|
|
- Remove setup special-casing in Flags::parse
|
|
Speed up tidy
This can be reviewed commit by commit since they contain separate optimizations.
```
# master
$ taskset -c 0-5 hyperfine './x test tidy'
Benchmark #1: ./x test tidy
Time (mean ± σ): 4.857 s ± 0.064 s [User: 12.967 s, System: 2.014 s]
Range (min … max): 4.779 s … 4.997 s 10 runs
# PR
$ taskset -c 0-5 hyperfine './x test tidy'
Benchmark #1: ./x test tidy
Time (mean ± σ): 3.672 s ± 0.035 s [User: 10.524 s, System: 2.029 s]
Range (min … max): 3.610 s … 3.725 s 10 runs
```
|
|
bootstrap: Allow installing `llvm-tools`
This PR allows installing the `llvm-tools` dist tarball using `./x.py install`.
|
|
target)
This allows us to use a consistent path in the documentation, without having to worry about which platform people are using.
|
|
This takes a long time and rarely fails. It also interferes with `retry make prepare`, the retry is unhelpful since `make prepare` turns into a no-op
|
|
|
|
This commit updates the CI definitions to use the most recent Android
LTS NDK release: r25b. Changes since the last NDK used by Rust negate
the need to generate "standalone toolchains" and newer NDKs can be used
in-place.
See https://developer.android.com/ndk/guides/other_build_systems#overview
|
|
Fix unsoundness in bootstrap cache code
Discovered via #105575, which showed that rustc was failing to build during a perf run.
|
|
We don't distribute a miri build for beta/stable so it needs to be kept
optional. In the future it likely makes sense to switch the miri
*artifacts* to always be built, but the rustup component to not be
included -- this will avoid some of this pain.
|
|
|
|
|
|
Build rust-analyzer proc-macro server by default
This allows getting rid of some documentation and an extra step when building a custom toolchain: https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html#creating-a-rustup-toolchain and it seems likely that people will want to do this if they want rustdoc (which is also built by default).
|
|
Set `download-ci-llvm = "if-available"` by default when `channel = dev`
See https://github.com/rust-lang/compiler-team/issues/566. The motivation for changing the default is to avoid downloading and building LLVM when someone runs `x build` before running `x setup`. The motivation for only doing it on `channel = "dev"` is to avoid breaking distros or users installing from source. It works because `dev` is also the default channel.
The diff looks larger than it is; most of it is moving the `llvm` branch below the `rust` so `config.channel` is set.
r? `@Mark-Simulacrum` cc `@oli-obk` `@bjorn3` `@cuviper`
|
|
This allows getting rid of some documentation and an extra step when building a custom toolchain: https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html#creating-a-rustup-toolchain
and it seems likely that people will want to do this if they want rustdoc (which is also built by default).
|
|
Add prototype to generate `COPYRIGHT` from REUSE metadata
This PR adds a prototype to generate the `COPYRIGHT` file from the metadata gathered with REUSE. There are two new tools:
* `src/tools/collect-license-metadata` invokes REUSE, parses its output and stores a concise JSON representation of the metadata in `src/etc/license-metadata.json`.
* `src/tools/generate-copyright` parses the metadata generated above, (in the future will) gather crate dependencies metadata, and renders the `COPYRIGHT.md` file.
Note that since the contents of those files are currently incorrect, rather than outputting in the paths above, the files will be stored in `build/` and not committed. This will be changed once we're confident about the metadata.
Eventually, `src/etc/license-metadata.json` will be committed into the repository and verified to be up to date by CI (similar to our GitHub Actions configuration), to avoid having people install REUSE on their local machine in most cases.
You can see the (incorrect) generated files in https://gist.github.com/pietroalbini/3f3f22b6f9cc8533abf7494b6a50cf97.
r? `@pnkfelix`
|
|
Ensure required submodules at the same time as updating existing submodules
In practice, this would always happen at the same time, but putting them next to each other makes that more obvious and ensures it doesn't change in the future. It also avoids the difference affecting `cargo metadata` somehow.
This is based on https://github.com/rust-lang/rust/pull/104952 for convenience to avoid merge conflicts, but doesn't depend on that PR.
|
|
Streamline the user experience for `x.py setup`
## Don't update submodules for x setup
Before, the submodule handling was very jank and would update *between two interactive prompts*:
```
; x setup
Building rustbuild
Finished dev [unoptimized] target(s) in 0.05s
Welcome to the Rust project! What do you want to do with x.py?
a) library: Contribute to the standard library
Please choose one (a/b/c/d/e): a
Updating submodule library/backtrace
Submodule 'library/backtrace' (https://github.com/rust-lang/backtrace-rs.git) registered for path 'library/backtrace'
error: you asked `x.py` to setup a new config file, but one already exists at `config.toml`
Build completed unsuccessfully in 0:00:02
```
That's not a great user experience because you need to wait a long time between prompts.
It would be possible to move the submodule handling either before or after the prompt, but it seems
better to just not require submodules to be checked out at all, to minimize the time spend waiting
just to create a new configuration.
## Revamp the order setup executes
- Create `config.toml` last. It's the most likely to error, and used to stop later steps from executing
- Don't print an error message + exit if the git hook already exists; that's expected
|
|
deps: update cpufeatures, swap difference to dissimilar
Updating cpufeatures v0.2.1 -> v0.2.5: https://github.com/RustCrypto/utils/blob/master/cpufeatures/CHANGELOG.md#025-2022-09-04, was yanked bc of miscompile (https://github.com/RustCrypto/utils/pull/800, https://github.com/rust-lang/rust/issues/101346)
Removing difference v2.0.0
Adding dissimilar v1.0.4
Updating expect-test v1.0.1 -> v1.4.0
difference unmaintened https://rustsec.org/advisories/RUSTSEC-2020-0095.html, so replaced with https://github.com/dtolnay/dissimilar (as dependency of `expect-test`)
|
|
This removes a lazy_static dependency edge
|
|
This removes an autocfg dependency edge
|
|
This replaces ansi_term with yansi which in turn removes a winapi
dependency edge
|
|
|
|
Don't overwrite local changes when updating submodules
Fixes https://github.com/rust-lang/rust/issues/103485
|
|
|
|
|
|
|
|
Support unit tests for jsondoclint
r? ````@ghost````
|
|
Don't build `compiler_builtins` with `-C panic=abort`
|
|
|
|
In practice, this would always happen at the same time, but putting them next to each other makes that more obvious and ensures it doesn't change in the future.
It also avoids the difference avoiding `cargo metadata` somehow.
|
|
- Create `config.toml` last. It's the most likely to error, and used to stop later steps from executing
- Don't print an error message + exit if the git hook already exists; that's expected
|
|
|
|
Before, the submodule handling was very jank and would update *between two interactive prompts*:
```
; x setup
Building rustbuild
Finished dev [unoptimized] target(s) in 0.05s
Welcome to the Rust project! What do you want to do with x.py?
a) library: Contribute to the standard library
Please choose one (a/b/c/d/e): a
Updating submodule library/backtrace
Submodule 'library/backtrace' (https://github.com/rust-lang/backtrace-rs.git) registered for path 'library/backtrace'
error: you asked `x.py` to setup a new config file, but one already exists at `config.toml`
Build completed unsuccessfully in 0:00:02
```
That's not a great user experience because you need to wait a long time between prompts.
It would be possible to move the submodule handling either before or after the prompt, but it seems
better to just not require submodules to be checked out at all, to minimize the time spend waiting
just to create a new configuration.
|
|
This reverts commit fb3e724d7602675f147a9b80e70fb6bd6512738c, which broke `rustup update` for anyone with clippy or rustfmt installed.
|
|
|
|
r=jyn514
rustbuild: Don't build doc::SharedAssets when building JSON docs.
Previously, running `./x doc library/core/ --json` on a plain build would panic bootstrap.
```
$ ./x doc library/core/ --json
Building rustbuild
Blocking waiting for file lock on package cache
Compiling bootstrap v0.0.0 (/home/nixon/dev/rust/rust/src/bootstrap)
Finished dev [unoptimized] target(s) in 4.47s
thread 'main' panicked at 'fs::write(&version_info, &info) failed with No such file or directory (os error 2) ("/home/nixon/dev/rust/rust/build/x86_64-unknown-linux-gnu/doc/version_info.html")', doc.rs:410:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Build completed unsuccessfully in 0:00:04
```
Becuase the `SharedAssets` step assumes that the HTML out dir has been created. This isn't true for JSON.
The fix is to not build shared assets when doing a JSON doc build, as it doesn't need them.
r? ``@jyn514``
``@rustbot`` modify labels: +A-rustdoc-json
|
|
Fix typo in miri sysroot
r? ``@RalfJung``
|
|
|
|
|
|
|
|
Don't set `is_preview` for clippy and rustfmt
These have been shipped on stable for many years now and it would be very disruptive to ever remove them.
Remove the `-preview` suffix from their dist components.
Based on https://github.com/rust-lang/rust/pull/102565.
|
|
|
|
|
|
These have been shipped on stable for many years now and it would be very disruptive to ever remove them.
Remove the `-preview` suffix from their dist components.
|
|
copy doc output files by format
This pr provides copying doc outputs by checking output format without removing output directory on each trigger.
Resolves #103785
|