about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2023-04-29download-rustc: Give a better error message if artifacts can't be downloadedJoshua Nelson-1/+12
Before: ``` downloading https://ci-artifacts.rust-lang.org/rustc-builds/bf5cad8e775fb326465e5c1b98693e5d259da156/rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz curl: (22) The requested URL returned error: 404 ``` After: ``` downloading https://ci-artifacts.rust-lang.org/rustc-builds/bf5cad8e775fb326465e5c1b98693e5d259da156/rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz curl: (22) The requested URL returned error: 404 error: failed to download pre-built rustc from CI note: old builds get deleted after a certain time help: if trying to compile an old commit of rustc, disable `download-rustc` in config.toml: [rust] download-rustc = false ```
2023-04-29switch Crate to run_cargo_testjyn-61/+43
2023-04-29[wip] separate out a test_crate_args fnjyn-16/+20
2023-04-29Remove unnecessary `test_kind` field and `TestKind` structjyn-66/+21
2023-04-28handle cfg(bootstrap)Pietro Albini-4/+1
2023-04-28Rollup merge of #110909 - john-h-k:build/no-rustc-version-darwin, r=jyn514Yuki Okushi-11/+17
Skip `rustc` version detection on macOS Fixes #104723
2023-04-27Comment round #1John Kelly-2/+3
2023-04-27Skip rustc version detection on macOSJohn Kelly-13/+18
2023-04-27fix bug in set argsyukang-1/+3
2023-04-27Fix help message of option for checking Listyukang-4/+3
2023-04-27add testyukang-0/+6
2023-04-27configure --set support list as argumentsyukang-0/+7
2023-04-25Add a `sysroot` crate to represent the standard library cratesJohn Kåre Alsaker-6/+6
2023-04-25Rollup merge of #110779 - jchzhou:patch, r=albertlarsan68Matthias Krüger-0/+4
configure.py: add flag for riscv{64,32}gc musl-root Add the corresponding flag for detecting `--musl-root-riscv64gc` and `--musl-root-riscv32gc` with ./configure, which is beneficial for downstream Linux distros to create the rust package with the same "recipe" from other architectures.
2023-04-25Rollup merge of #110744 - weihanglo:cargo-credential-install, r=ehussYuki Okushi-3/+3
bootstrap: update paths cargo-credential crate This should be done in #110653 but forgot. Fixes #110742 ## How to verify this patch Run `./x.py build cargo`. Previously it would fail with ```console error: manifest path `/projects/rust/src/tools/cargo/crates/credential/cargo-credential-1password/Cargo.toml` does not exist ```
2023-04-25configure.py: add flag for riscv{64,32}gc musl-rootjchzhou-0/+4
2023-04-24Rollup merge of #110637 - oli-obk:gha, r=jyn514Matthias Krüger-177/+166
Group some sections of our logs in github actions This makes logs a little bit more readable as you can now collapse all the parts that don't interest you (and they get collapsed automatically) Obviously there's a lot more sites where we can/need to do this, too, but this is already helpful imo r? ```@jyn514```
2023-04-23bootstrap: update paths cargo-credential crateWeihang Lo-3/+3
This should be done in #110653 but forgot.
2023-04-23Rollup merge of #110664 - Ezrashaw:fix-bootstrap-build-format, r=jyn514Matthias Krüger-4/+2
stop `x fmt` formatting untracked directories I don't think there's anything else to do? I've confirmed that you get a "skip untracked path foo/ during rustfmt invocations" for the alternative build directory. r? `@jyn514`
2023-04-22Group entire build steps in the gha logsOli Scherer-177/+166
2023-04-22stop `x fmt` formatting alt build dirsEzra Shaw-4/+2
2023-04-21Rollup merge of #110365 - ozkanonur:ship-tools-with-sysroot, r=jyn514Matthias Krüger-7/+27
ship tools with sysroot Provides tool binaries under the sysroot which can be used/tested with `cargo +custom-toolchain $tool` Clippy and fmt works without any problem. But can't say the same for miri: ```sh  ~/devspace/.other/chunk-list  stable $ cargo +stage2 miri setup Running `"rustup" "component" "add" "rust-src"` to install the `rust-src` component for the selected toolchain. error: stage2 is a custom toolchain fatal error: failed to install the `rust-src` component for the selected toolchain ``` it's looking for `$sysroot/lib/rustlib/src/rust/library` and that simply doesn't exists for `x build`. cc `@jyn514` (I thought you might be interested on this, since you did few review iterations on previous PRs of adding tools to sysroot) -- **Update** Now we are able to use `miri` as well. After running `x b miri cargo-miri --stage 2`, I am able to run `cargo +stage2 miri setup` which works as expected. Resolves #110625 Resolves #97762 Resolves #81431
2023-04-21remove the early return in `Sysroot::run` which causes bypassing symlinkingozkanonur-1/+0
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-04-21ship clippy, miri and rustfmt with sysrootozkanonur-6/+27
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-04-20Rollup merge of #110574 - wangkirin:fix-out-of-date-comments, r=albertlarsan68Matthias Krüger-2/+2
fix out-of-date comment about rpath in bootstrap in #64316 (https://github.com/rust-lang/rust/pull/64316/commits/1bec962f4687eacb09bf12955c93f6edfd6efee8), the `RUSTC_RPATH` enviroment variables had been removed , but the comments about the rpath still keep it this PR fix it to avoid misunstanding
2023-04-20Rollup merge of #110516 - loongarch-rs:update-bootstrap-linux-raw-sys, ↵Yuki Okushi-2/+2
r=Mark-Simulacrum bootstrap: Update linux-raw-sys to 0.3.2 Adds support for LoongArch.
2023-04-20 fix out of date comment about rpath in bootstrapWang Qilin-2/+2
2023-04-19Rollup merge of #110541 - jyn514:fix-configure, r=ozkanonurMatthias Krüger-5/+7
Fix various configure bugs Fixes https://github.com/rust-lang/rust/issues/107050. Fixes https://github.com/rust-lang/rust/issues/108928. Closes https://github.com/rust-lang/rust/pull/108641. I recommend reading this commit-by-commit to see the commit descriptions, but the code changes are small. This also changes the README to suggest `configure` instead of `printf`, as well as a few other cleanups described in the commit message.
2023-04-19Rollup merge of #110515 - jyn514:download-rustc-llvm, r=albertlarsan68Matthias Krüger-14/+0
Don't special-case download-rustc in `maybe_install_llvm` This is no longer necessary now that the llvm in `rust-dev` matches the one in `rustc`. cc https://github.com/rust-lang/rust/pull/110490#issuecomment-1513026675, https://github.com/rust-lang/rust/pull/110263
2023-04-19Rollup merge of #110429 - jsoref:spelling-src-bootstrap, r=albertlarsan68Matthias Krüger-6/+6
Spelling src bootstrap The various src/* items seem slightly disparate, so I'm doing src/* individually. split from #110392
2023-04-19Rollup merge of #110123 - madsravn:master, r=jyn514Matthias Krüger-0/+6
'./configure' now checks if 'config.toml' exists before writing to that destination Fixes #110109 Instead of overwriting the current `config.toml` file, exit the `./configure` script with a message stating why.
2023-04-19configure: Set `profile = user` by defaultjyn-0/+3
2023-04-19configure: Fix bug in `configure_top_level_key`jyn-5/+4
Before, it only worked for numbers, not strings.
2023-04-19Changing position of early exit and using standard error method with correct ↵Mads Ravn-4/+4
exit code
2023-04-19Rollup merge of #110507 - weihanglo:print-try-run-output, r=jyn514Matthias Krüger-1/+1
boostrap: print output during building tools Fixes #110506
2023-04-19bootstrap: Update linux-raw-sys to 0.3.2WANG Rui-2/+2
Adds support for LoongArch.
2023-04-18Don't special-case download-rustc in `maybe_install_llvm`jyn-14/+0
This is no longer necessary now that the llvm in `rust-dev` matches the one in `rustc`.
2023-04-19Auto merge of #110229 - jyn514:download-rustc-tests, r=albertlarsan68bors-17/+77
Fix no_std tests that load libc from the sysroot when download-rustc is enabled There were a series of unfortunate interactions here. Here's an MCVE of the test this fixes (committed as `tests/ui/meta/no_std-extern-libc.rs`): ```rust #![crate_type = "lib"] #![no_std] #![feature(rustc_private)] extern crate libc; ``` Before, this would give an error about duplicate versions of libc: ``` error[E0464]: multiple candidates for `rlib` dependency `libc` found --> fake-test-src-base/allocator/no_std-alloc-error-handler-default.rs:15:1 | LL | extern crate libc; | ^^^^^^^^^^^^^^^^^^ | = note: candidate #1: /home/gh-jyn514/rust/build/aarch64-unknown-linux-gnu/stage2/lib/rustlib/aarch64-unknown-linux-gnu/lib/liblibc-358db1024b7d9957.rlib = note: candidate #2: /home/gh-jyn514/rust/build/aarch64-unknown-linux-gnu/stage2/lib/rustlib/aarch64-unknown-linux-gnu/lib/liblibc-ebc478710122a279.rmeta ``` Both these versions were downloaded from CI, but one came from the `rust-std` component and one came from `rustc-dev`: ``` ; tar -tf build/cache/f2d9a3d0771504f1ae776226a5799dcb4408a91a/rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz | grep liblibc rust-std-nightly-x86_64-unknown-linux-gnu/rust-std-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-68a2d9e195dd6ed2.rlib ; tar -tf build/cache/f2d9a3d0771504f1ae776226a5799dcb4408a91a/rustc-dev-nightly-x86_64-unknown-linux-gnu.tar.xz | grep liblibc rustc-dev-nightly-x86_64-unknown-linux-gnu/rustc-dev/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-f226c9fbdd92a0fd.rmeta ``` The fix was to only copy files from `rust-std` unless a Step explicitly requests for the `rustc-dev` components to be available by calling `builder.ensure(compile::Rustc)`. To avoid having to re-parse the `rustc-dev.tar.xz` tarball every time, which is quite slow, this adds a new `build/host/ci-rustc/.rustc-dev-contents` cache file which stores only the names of files we need to copy into the sysroot. This also allows reverting the hack in https://github.com/rust-lang/rust/pull/110121; now that we only copy rustc-dev on-demand, we can correctly add the `Rustc` check artifacts into the sysroot, so that this works correctly even when `download-rustc` is forced to `true` and some tool depends on a local change to `compiler`. --- See https://github.com/rust-lang/rust/issues/108767#issuecomment-1501217657 for why `no_std` is required for the MCVE test to fail; it's complicated and not particularly important. Fixes https://github.com/rust-lang/rust/issues/108767.
2023-04-18boostrap: print output during building toolsWeihang Lo-1/+1
2023-04-18Auto merge of #110492 - GuillaumeGomez:rollup-n4tpbl4, r=GuillaumeGomezbors-3/+5
Rollup of 5 pull requests Successful merges: - #110417 (Spelling compiler) - #110441 (5 little typos) - #110485 (Fix bootstrap locking) - #110488 (Add a failing rustdoc-ui test for public infinite recursive type) - #110490 (Bump `download-ci-llvm-stamp` for loong support) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-04-18Rollup merge of #110490 - jyn514:bump-llvm, r=nikicGuillaume Gomez-1/+1
Bump `download-ci-llvm-stamp` for loong support This was missed in https://github.com/rust-lang/rust/pull/96971 and resulted in the LLVM we cache in CI being different from the one built locally. We didn't catch it because nothing tested the loong support. Fixes https://github.com/rust-lang/rust/issues/110474. r? `@nikic`
2023-04-18Rollup merge of #110485 - albertlarsan68:fix-bootstrap-lock, r=ozkanonurGuillaume Gomez-2/+4
Fix bootstrap locking Fix the regression introduced in #108607 Fixes #109967
2023-04-18Bump `download-ci-llvm-stamp` for loong supportjyn-1/+1
This was missed in https://github.com/rust-lang/rust/pull/96971 and resulted in the LLVM we cache in CI being different from the one built locally. We didn't catch it because nothing tested the loong support.
2023-04-18Fix no_std tests that load libc when download-rustc is enabledJoshua Nelson-17/+77
There were a series of unfortunate interactions here. Here's an MCVE of the test this fixes (committed as `tests/ui/meta/no_std-extern-libc.rs`): ```rust #![crate_type = "lib"] #![no_std] #![feature(rustc_private)] extern crate libc; ``` Before, this would give an error about duplicate versions of libc: ``` error[E0464]: multiple candidates for `rlib` dependency `libc` found --> fake-test-src-base/allocator/no_std-alloc-error-handler-default.rs:15:1 | LL | extern crate libc; | ^^^^^^^^^^^^^^^^^^ | = note: candidate #1: /home/gh-jyn514/rust/build/aarch64-unknown-linux-gnu/stage2/lib/rustlib/aarch64-unknown-linux-gnu/lib/liblibc-358db1024b7d9957.rlib = note: candidate #2: /home/gh-jyn514/rust/build/aarch64-unknown-linux-gnu/stage2/lib/rustlib/aarch64-unknown-linux-gnu/lib/liblibc-ebc478710122a279.rmeta ``` Both these versions were downloaded from CI, but one came from the `rust-std` component and one came from `rustc-dev`: ``` ; tar -tf build/cache/f2d9a3d0771504f1ae776226a5799dcb4408a91a/rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz | grep liblibc rust-std-nightly-x86_64-unknown-linux-gnu/rust-std-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-68a2d9e195dd6ed2.rlib ; tar -tf build/cache/f2d9a3d0771504f1ae776226a5799dcb4408a91a/rustc-dev-nightly-x86_64-unknown-linux-gnu.tar.xz | grep liblibc rustc-dev-nightly-x86_64-unknown-linux-gnu/rustc-dev/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-f226c9fbdd92a0fd.rmeta ``` The fix was to only copy files from `rust-std` unless a Step explicitly requests for the `rustc-dev` components to be available by calling `builder.ensure(compile::Rustc)`. To avoid having to re-parse the `rustc-dev.tar.xz` tarball every time, which is quite slow, this adds a new `build/host/ci-rustc/.rustc-dev-contents` cache file which stores only the names of files we need to copy into the sysroot. This also allows reverting the hack in https://github.com/rust-lang/rust/pull/110121; now that we only copy rustc-dev on-demand, we can correctly add the `Rustc` check artifacts into the sysroot, so that this works correctly even when `download-rustc` is forced to `true`. --- See https://github.com/rust-lang/rust/issues/108767#issuecomment-1501217657 for why `no_std` is required for the MCVE test to fail; it's complicated and not particularly important. Fixes https://github.com/rust-lang/rust/issues/108767.
2023-04-18Auto merge of #110478 - jyn514:stage1-fulldeps, r=albertlarsan68bors-7/+36
Support `x test --stage 1 ui-fulldeps` `@Nilstrieb` had an excellent idea the other day: the same way that rustdoc is able to load `rustc_driver` from the sysroot, ui-fulldeps tests should also be able to load it from the sysroot. That allows us to run fulldeps tests with stage1, without having to fully rebuild the compiler twice. It does unfortunately have the downside that we're building the tests with the *bootstrap* compiler, not the in-tree sources, but since most of the fulldeps tests are for the *API* of the compiler, that seems ok. I think it's possible to extend this to `run-make-fulldeps`, but I've run out of energy for tonight. - Move `plugin` tests into a subdirectory. Plugins are loaded at runtime with `dlopen` and so require the ABI of the running compile to match the ABI of the compiler linked with `rustc_driver`. As a result they can't be supported in stage 1 and have to use `// ignore-stage1`. - Remove `ignore-stage1` from most non-plugin tests - Ignore diagnostic tests in stage 1. Even though this requires a stage 2 build to load rustc_driver, it's primarily testing the error message that the *running* compiler emits when the diagnostic struct is malformed. - Pass `-Zforce-unstable-if-unmarked` in stage1, not just stage2. That allows running `hash-stable-is-unstable` in stage1, since it now suggests adding `rustc_private` to enable loading the crates. - Add libLLVM.so to the stage0 target sysroot, to allow fulldeps tests that act as custom drivers to load it at runtime. - Pass `--sysroot stage0-sysroot` in compiletest so that we use the correct version of std. - Move a few lint tests from ui-fulldeps to ui These had an `aux-build:lint-group-plugin-test.rs` that they never actually loaded with `feature(plugin)` nor tested. I removed the unused aux-build and they pass fine with stage 1. Fixes https://github.com/rust-lang/rust/issues/75905.
2023-04-18Fix bootstrap lockingAlbert Larsan-2/+4
Fix the regression introduced in 108607
2023-04-18Rollup merge of #110442 - ferrocene:pa-build-metrics-dry-run, r=ozkanonurMatthias Krüger-6/+22
Avoid including dry run steps in the build metrics Including steps executed during the dry run will result in a duplication of all the steps in the build metrics, which just adds noise.
2023-04-18Rollup merge of #109981 - duckymirror:issue-107094, r=albertlarsan68Matthias Krüger-0/+10
Set commit information environment variables when building tools This fixes #107094. ~I'm trying to add a regression test for this issue.~ **Update**: I've added a test and a new test header `needs-git-hash` which makes sure it doesn't run when commit hashes are ignored (`bootstrap`'s `ignore-git` option).
2023-04-17Support `x test --stage 1 ui-fulldeps`jyn-7/+36
Nils had an excellent idea the other day: the same way that rustdoc is able to load `rustc_driver` from the sysroot, ui-fulldeps tests should also be able to load it from the sysroot. That allows us to run fulldeps tests with stage1, without having to fully rebuild the compiler twice. It does unfortunately have the downside that we're running the tests on the *bootstrap* compiler, not the in-tree sources, but since most of the fulldeps tests are for the *API* of the compiler, that seems ok. I think it's possible to extend this to `run-make-fulldeps`, but I've run out of energy for tonight. - Move `plugin` tests into a subdirectory. Plugins are loaded at runtime with `dlopen` and so require the ABI of the running compile to match the ABI of the compiler linked with `rustc_driver`. As a result they can't be supported in stage 1 and have to use `// ignore-stage1`. - Remove `ignore-stage1` from most non-plugin tests - Ignore diagnostic tests in stage 1. Even though this requires a stage 2 build to load rustc_driver, it's primarily testing the error message that the *running* compiler emits when the diagnostic struct is malformed. - Pass `-Zforce-unstable-if-unmarked` in stage1, not just stage2. That allows running `hash-stable-is-unstable` in stage1, since it now suggests adding `rustc_private` to enable loading the crates. - Add libLLVM.so to the stage0 target sysroot, to allow fulldeps tests that act as custom drivers to load it at runtime. - Pass `--sysroot stage0-sysroot` in compiletest so that we use the correct version of std.
2023-04-18Auto merge of #110403 - klensy:bolt-deprecate, r=albertlarsan68,Kobzolbors-1/+1
bolt: remove deprecated option value for split-functions Noticed warning at https://github.com/rust-lang-ci/rust/actions/runs/4711883459/jobs/8356538964#step:26:40828, option value was removed at https://github.com/llvm/llvm-project/commit/96f6ec5090c2f7a1e4804693cbb84c29c574b3de. bolt only running on latest supported llvm (yes?), so it's safe to apply this patch. cc `@Kobzol`