about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2022-12-17Symlink `build/host` -> `build/x86_64-unknown-linux-gnu` (as appropriate per ↵Joshua Nelson-1/+18
target) This allows us to use a consistent path in the documentation, without having to worry about which platform people are using.
2022-12-17Make `RUN_CHECK_WITH_PARALLEL_QUERIES` the last thing to runJoshua Nelson-0/+1
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
2022-12-17poll rustfmt child processesThe 8472-4/+19
2022-12-14Update CI to use Android NDK r25bChris Wailes-6/+18
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
2022-12-14Rollup merge of #105624 - compiler-errors:cache-unsound, r=jyn514Matthias Krüger-4/+4
Fix unsoundness in bootstrap cache code Discovered via #105575, which showed that rustc was failing to build during a perf run.
2022-12-13Adjust miri to still be optionalMark Rousskov-25/+31
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.
2022-12-12🚨 fix unsoundness in bootstrap cache codeMichael Goulet-4/+4
2022-12-11bootstrap: Allow installing llvm-toolsMartin Kröning-0/+7
2022-12-11Rollup merge of #105459 - jyn514:proc-macro-default, r=Mark-SimulacrumMatthias Krüger-10/+0
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).
2022-12-10Rollup merge of #104512 - jyn514:download-ci-llvm-default, r=Mark-SimulacrumMatthias Krüger-96/+138
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`
2022-12-08Build rust-analyzer proc-macro server by defaultJoshua Nelson-10/+0
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).
2022-12-06Rollup merge of #104439 - ferrocene:pa-generate-copyright, r=pnkfelixMatthias Krüger-0/+77
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`
2022-12-05Rollup merge of #104953 - jyn514:fewer-submodule-updates, r=Mark-SimulacrumMatthias Krüger-3/+3
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.
2022-12-05Rollup merge of #104952 - jyn514:setup, r=Mark-SimulacrumMatthias Krüger-67/+77
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
2022-12-05Auto merge of #104824 - klensy:bump-some, r=Mark-Simulacrumbors-2/+2
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`)
2022-12-04Update crossbeambjorn3-12/+10
This removes a lazy_static dependency edge
2022-12-04Update rayon to 1.6bjorn3-5/+4
This removes an autocfg dependency edge
2022-12-04Update pretty_assertions to 1.3bjorn3-13/+10
This replaces ansi_term with yansi which in turn removes a winapi dependency edge
2022-12-03Don't exit with an error if there are no changes to submodulesJoshua Nelson-2/+15
2022-11-30Rollup merge of #104865 - pratushrai0309:bootstrap, r=jyn514Matthias Krüger-2/+3
Don't overwrite local changes when updating submodules Fixes https://github.com/rust-lang/rust/issues/103485
2022-11-29Run patchelf also on rust-analyzer-proc-macro-srv.Joe Neeman-0/+2
2022-11-29update cpufeatures, swap difference to dissimilarklensy-2/+2
2022-11-27suggested changesPratush Rai-1/+0
2022-11-27Rollup merge of #104944 - aDotInTheVoid:jsondoclint-unit-tests, r=jyn514Matthias Krüger-0/+37
Support unit tests for jsondoclint r? ````@ghost````
2022-11-27Auto merge of #103786 - tshepang:obsolete, r=jyn514bors-7/+1
Don't build `compiler_builtins` with `-C panic=abort`
2022-11-27suggested changesPratush Rai-2/+2
2022-11-26Ensure required submodules at the same time as updating existing submodulesJoshua Nelson-3/+3
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.
2022-11-26Revamp the order `setup` executesJoshua Nelson-13/+15
- 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
2022-11-26Refactor `setup_config_toml` into a functionJoshua Nelson-31/+31
2022-11-26Don't update submodules for `x setup`Joshua Nelson-24/+32
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.
2022-11-26Revert "Don't set `is_preview` for clippy and rustfmt"Joshua Nelson-2/+4
This reverts commit fb3e724d7602675f147a9b80e70fb6bd6512738c, which broke `rustup update` for anyone with clippy or rustfmt installed.
2022-11-26Support unit tests for jsondoclintNixon Enraght-Moony-0/+37
2022-11-25Rollup merge of #104887 - aDotInTheVoid:rustbuild-json-doc-shared-assets, ↵Matthias Krüger-1/+3
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
2022-11-25Rollup merge of #104853 - jyn514:sysroot-typo, r=RalfJungMatthias Krüger-1/+1
Fix typo in miri sysroot r? ``@RalfJung``
2022-11-25remove unused codeTshepang Mbambo-3/+1
2022-11-25remove obsolete commentTshepang Mbambo-4/+0
2022-11-25rustbuild: Don't build doc::SharedAssets when building JSON docs.Nixon Enraght-Moony-1/+3
2022-11-25Rollup merge of #103648 - jyn514:no-preview, r=Mark-SimulacrumMatthias Krüger-4/+2
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.
2022-11-25bootstrapPratush Rai-2/+4
2022-11-24Fix typo in miri sysrootJoshua Nelson-1/+1
2022-11-24Don't set `is_preview` for clippy and rustfmtJoshua Nelson-4/+2
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.
2022-11-23Rollup merge of #104286 - ozkanonur:fix-doc-bootstrap-recompilation, r=jyn514Dylan DPC-14/+15
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
2022-11-23Bump `fd-lock` in `bootstrap` againMateusz Mikuła-61/+22
Followup to https://github.com/rust-lang/rust/pull/103778 Sorry for the quick succession but this fixes one more building issue for Tier 3 `windows-gnullvm` that I have previously missed, and it would be nice to have it in the release.
2022-11-22Rollup merge of #104622 - nicholasbishop:bishop-uefi-clang, r=Mark-SimulacrumManish Goregaokar-0/+49
Use clang for the UEFI targets This fixes an issue where the C and asm sources built by compiler_builtins were being compiled as ELF objects instead of PE objects. This wasn't noticed before because it doesn't cause compiler_builtins or rustc to fail to build. You only see a failure when a program is built that references one of the symbols in an ELF object. Compiling with clang fixes this because the cc crate converts the UEFI targets into Windows targets that clang understands, causing it to produce PE objects. Also update compiler_builtins to 0.1.84 to pull in some necessary fixes for compiling the UEFI targets with clang. Fixes https://github.com/rust-lang/rust/issues/104326
2022-11-21Rollup merge of #104628 - alex-pinkus:revert-android-ndk-upgrade, r=pietroalbiniMatthias Krüger-18/+6
Revert "Update CI to use Android NDK r25b" This reverts commit bf7f1ca316a249cf99d722d79a0db12fef687142 (pull request #102332). The relevant discussion can be found in #103673, where it was agreed that more time is needed to warn the community of the upcoming breakage. This PR is for the `master` branch, where a conflict was recently introduced due to 6d8160261ff3aee3b6eaacc37ac96cafff530980. The conflict is in `cc_detect.rs`, where the code that corrects the target triple was moved to a new function called `ndk_compiler()`. This puts the old logic in the `ndk_compiler` function, and assumes that it works properly in the other location where that code is being called. I would appreciate review from ``@pietroalbini`` to understand how we can test that the reverted logic is also suitable for the additional use case (seems to be related to setting `cc` and `cxx`). I've confirmed already that with these changes I can compile for `armv7-linux-androideabi`, `aarch64-linux-android`, `i686-linux-android`, and `x86_64-linux-android` using `x.py`. A separate revert for the `beta` branch will be required, since the original change has already made it to beta. The beta revert is available at https://github.com/alex-pinkus/rust/commit/3fa0d94674fbe37090ebe44ac1f06e2233f3121e, but I'm not sure of the process for staging that PR.
2022-11-20Rollup merge of #104487 - klensy:ntapi, r=Mark-SimulacrumMatthias Krüger-6/+6
update ntapi dep to remove future-incompat warning This fixes warning https://github.com/rust-lang-ci/rust/actions/runs/3477235400/jobs/5813202075#step:25:217 `warning: the following packages contain code that will be rejected by a future version of Rust: ntapi v0.3.7` by upgrading `sysinfo` version (https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md#0267) There was some breaking changes in `sysinfo`: * 0.25.0 (System::refresh_cpu behaviour changed: it only computes CPU usage and doesn't retrieve CPU frequency.) not affected? * 0.26.0 (Switch memory unit from kilobytes to bytes) fixed.
2022-11-20dist: Ensure UEFI rlibs are all COFFNicholas Bishop-0/+49
If clang isn't the C compiler used for the UEFI targets, or if the wrong `--target` is passed to clang, we will get ELF objects in some rlibs. This will cause problems at link time when trying to compile a UEFI program that uses any of those objects. Add a check to the dist step for UEFI targets that reads each rlib with the `object` crate and fails with an error if any non-COFF objects are found.
2022-11-20Rollup merge of #104611 - notriddle:notriddle/scrape-examples-button, ↵Matthias Krüger-0/+2
r=GuillaumeGomez rustdoc: use real buttons for scrape examples controls This makes the expand and switch controls keyboard-accessible. Preview: https://notriddle.com/notriddle-rustdoc-demos/scrape-examples-button/test_dingus/fn.test.html
2022-11-20refactor doc copying processozkanonur-48/+16
Signed-off-by: ozkanonur <work@onurozkan.dev>
2022-11-19Set `download-ci-llvm = "if-available"` by default when `channel = "dev"`Joshua Nelson-96/+138
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.