summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2024-09-26bootstrap: Set the dylib path when building books with rustdocJosh Stone-9/+11
The library path is needed when the toolchain has been configured with `[rust] rpath = false`. Otherwise, building the reference book will get an error when it tries to run rustdoc, like: rustdoc: error while loading shared libraries: librustc_driver-2ec457c3b8826b72.so (cherry picked from commit de4c8975aaa05063129196e470d3dcf7558f19b1)
2024-09-02Backport #129917Boxy-0/+1
2024-08-31Rollup merge of #129651 - onur-ozkan:stage0-target-sanity-check, r=KobzolMatthias Krüger-7/+2
skip stage 0 target check if `BOOTSTRAP_SKIP_TARGET_SANITY` is set When adding a new target to `rustc` and extending `STAGE0_MISSING_TARGETS`, there is a chance that in the merge CI bootstrap target sanity check might fail [here](https://github.com/rust-lang/rust/blob/26d27b7c8729fb61fe8321fcd2ce734a79aa695d/src/bootstrap/src/core/sanity.rs#L243-L256) because the stage 0 compiler will assume to already support the new target since `opt-dist` uses the previously compiled compiler as the stage 0 compiler. This PR skips this check if `BOOTSTRAP_SKIP_TARGET_SANITY` is set, and makes `opt-dist` to set `BOOTSTRAP_SKIP_TARGET_SANITY` so bootstrap doesn't run this logic for opt-dist tests. Fixes https://github.com/rust-lang/rust/pull/127021#issuecomment-2308782315. Zulip thread: https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/.60STAGE0_MISSING_TARGETS.60.20seems.20to.20check.20stage1 Blocker for https://github.com/rust-lang/rust/pull/127021
2024-08-29Allow running `./x.py test compiler`Lukas Wirth-8/+3
2024-08-28Rollup merge of #129695 - GuillaumeGomez:fix-clippy-rustdoc-path, r=onur-ozkanJubilee-1/+1
Fix path to run clippy on rustdoc Took me a while to find out that the path clippy expected was `src/tools/rustdoc` and not `src/librustdoc`. I think it makes more sense this way as most commands rely on source paths. r? ```@Kobzol```
2024-08-28Fix path to run clippy on rustdocGuillaume Gomez-1/+1
2024-08-27skip stage 0 target check if `BOOTSTRAP_SKIP_TARGET_SANITY` is setonur-ozkan-7/+2
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-08-27Rollup merge of #128935 - lqd:needs-zstd, r=KobzolTrevor Gross-1/+16
More work on `zstd` compression r? ``@Kobzol`` as we've discussed this. This is a draft to show the current approach of supporting zstd in compiletest, and making the tests using it unconditional. Knowing whether llvm/lld was built with `LLVM_ENABLE_ZSTD` is quite hard, so there are two strategies. There are details in the code, and we can discuss this approach. Until we know the config used to build CI artifacts, it seems our options are somewhat limited in any case. zlib compression seems always enabled, so we only check this in its dedicated test, allowing the test to ignore errors due to zstd not being supported. The zstd test is made unconditional in what it tests, by relying on `needs-llvm-zstd` to be ignored when `llvm.libzstd` isn't enabled in `config.toml`. try-job: x86_64-gnu try-job: x86_64-msvc try-job: x86_64-gnu-distcheck
2024-08-25allow `llvm.libzstd` with `download-ci-llvm = true`Rémy Rakic-1/+16
but warn about it
2024-08-25Auto merge of #129563 - matthiaskrgr:rollup-t6bai2d, r=matthiaskrgrbors-10/+51
Rollup of 7 pull requests Successful merges: - #129091 (add Box::as_ptr and Box::as_mut_ptr methods) - #129134 (bootstrap: improve error recovery flags to curl) - #129416 (library: Move unstable API of new_uninit to new features) - #129459 (handle stage0 `cargo` and `rustc` separately) - #129487 (repr_transparent_external_private_fields: special-case some std types) - #129511 (Update minifier to 0.3.1) - #129523 (Make `rustc_type_ir` build on stable) r? `@ghost` `@rustbot` modify labels: rollup
2024-08-25Rollup merge of #129459 - onur-ozkan:separate-stage0-bins, r=KobzolMatthias Krüger-9/+17
handle stage0 `cargo` and `rustc` separately This change allows setting either `build.cargo` or `build.rustc` without requiring both to be set simultaneously, which was not possible previously. To try it, set `build.rustc` without setting `build.cargo`, and try to bootstrap on clean build. Blocker for https://github.com/rust-lang/rust/pull/129152
2024-08-25Rollup merge of #129134 - lolbinarycat:continue-at, r=KobzolMatthias Krüger-1/+34
bootstrap: improve error recovery flags to curl alternative to #128459 fixes #110178 r? ````@Kobzol````
2024-08-25Auto merge of #129295 - Zalathar:profiler-builtins, r=Kobzolbors-12/+37
Build `library/profiler_builtins` from `ci-llvm` if appropriate Running all of `tests/coverage` requires the LLVM profiler runtime, which requires setting `build.profiler = true`. Historically, doing that has required checking out the entire `src/llvm-project` submodule. For compiler contributors who otherwise don't need that submodule (thanks to `download-ci-vm`), that's quite inconvenient. However, thanks to #129116, the downloaded CI LLVM tarball now contains a copy of LLVM's `compiler-rt` directory, which includes all the files needed to build the profiler runtime. So with a little bit of extra logic in bootstrap, we can have `library/profiler_builtins` look for the `compiler-rt` files in `ci-llvm` instead of the `src/llvm-project` submodule.
2024-08-24rewrite extract_curl_version againbinarycat-14/+11
2024-08-24Build `library/profiler_builtins` from `ci-llvm` if appropriateZalathar-12/+37
2024-08-23Auto merge of #129278 - ↵bors-26/+8
GuillaumeGomez:rm-duplicated-usage-of-unstable-options, r=Kobzol Remove duplicated usage of `-Zunstable-options` in bootstrap Surprisingly, sometimes it is in the same function. r? `@Kobzol`
2024-08-23use tuples for semver, not floatsbinarycat-9/+16
2024-08-23handle stage0 cargo and rustc separatelyonur-ozkan-9/+17
This change allows setting either `build.cargo` or `build.rustc` without requiring both to be set simultaneously, which was not possible previously. To try it, set `build.rustc` without setting `build.cargo`, and try to bootstrap on clean build. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-08-23Auto merge of #129464 - GuillaumeGomez:rollup-ckfqd7h, r=GuillaumeGomezbors-1/+1
Rollup of 9 pull requests Successful merges: - #128511 (Document WebAssembly target feature expectations) - #129243 (do not build `cargo-miri` by default on stable channel) - #129263 (Add a missing compatibility note in the 1.80.0 release notes) - #129276 (Stabilize feature `char_indices_offset`) - #129350 (adapt integer comparison tests for LLVM 20 IR changes) - #129408 (Fix handling of macro arguments within the `dropping_copy_types` lint) - #129426 (rustdoc-search: use tighter json for names and parents) - #129437 (Fix typo in a help diagnostic) - #129457 (kobzol vacation) r? `@ghost` `@rustbot` modify labels: rollup
2024-08-23Rollup merge of #129243 - onur-ozkan:stuff, r=KobzolGuillaume Gomez-1/+1
do not build `cargo-miri` by default on stable channel Skips `cargo-miri` build on `stable` channel just like `miri`. Closes #129171 cc ``@RalfJung``
2024-08-23Rollup merge of #128876 - ColinFinck:rust-lld-with-runtime-dlls, ↵Matthias Krüger-13/+24
r=Kobzol,petrochenkov,jieyouxu Ship MinGW-w64 runtime DLLs along with `rust-lld.exe` for `-pc-windows-gnu` targets `rust-lld.exe` built for `x86_64-pc-windows-gnu` depends on `libgcc_s_seh-1.dll` and `libwinpthread-1.dll` from MinGW-w64. Until now, they were not shipped alongside `rust-lld.exe`, and you could not run `rust-lld.exe` on most systems. This problem didn't surface until now because: * Most targets don't use `rust-lld` by default. * Some people had these DLLs in their `PATH` from some other MinGW binary. * `rustup` used to add `bin` to the `PATH`, which contains these DLLs for `rustc.exe`. But it no longer does that: https://github.com/rust-lang/rustup/commit/ce3c09a0cb126e2c65a3bb2a3bbf3f098b4c23a2 Fixes #125809 try-job: dist-x86_64-mingw
2024-08-22remove dbg!()binarycat-1/+1
2024-08-22Revert "bootstrap: fix clean's `remove_dir_all` implementation"许杰友 Jieyou Xu (Joe)-15/+78
This reverts commit 1687c55168f3837506afcd2240a8a0b6eadcc1eb.
2024-08-22do not build `cargo-miri` by default on stable channelonur-ozkan-1/+1
miri skipped for stable channel by default, do the same for `cargo-miri`. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-08-21Rollup merge of #129231 - onur-ozkan:improve-submodule-updates, ↵Matthias Krüger-129/+139
r=Mark-Simulacrum improve submodule updates During config parsing, some bootstrap logic (e.g., `download-ci-llvm`) checks certain sources (for `download-ci-llvm`, it's `src/llvm-project`) and acts based on their state. This means that if path is a git submodule, bootstrap needs to update it before checking its state. Otherwise it may make incorrect assumptions by relying on outdated sources. To enable submodule updates during config parsing, we need to move the `update_submodule` function from the `Build` to `Config`, so we can access to it during the parsing process. Closes #122787
2024-08-21Rollup merge of #129187 - jieyouxu:squeaky-clean-windows-symlinks, r=KobzolMatthias Krüger-78/+15
bootstrap: fix clean's remove_dir_all implementation It turns out bootstrap's `clean.rs`'s hand-rolled `rm_rf` (which probably comes before `std::fs::remove_dir_all` was stable) is very broken on native Windows around both read-only files/directories and especially symbolic links. So instead of rolling our own, just use `std::fs::remove_dir_all`. This is a blocker for compiletest's own `rm_rf` implementation #129155 which happens to be also buggy, which in turn is a blocker for the rmake.rs test port #128562 that heavily exercises symlinks (I was reviewing #128562 and testing it on native Windows which is how I found out). I also left a FIXME for `detect_src_and_out` due to a failing assertion on native Windows (opened #129188): ``` ---- core::config::tests::detect_src_and_out stdout ---- thread 'core::config::tests::detect_src_and_out' panicked at src\core\config\tests.rs:72:13: assertion `left == right` failed left: "E:\\tmp" right: "C:\\tmp" ``` Fixes #112544 (because now we handle Windows symlinks properly). try-job: x86_64-msvc try-job: i686-mingw try-job: test-various try-job: armhf-gnu try-job: aarch64-apple try-job: aarch64-gnu
2024-08-20Remove duplicated usage of `-Zunstable-options` in bootstrapGuillaume Gomez-26/+8
2024-08-19Auto merge of #129275 - matthiaskrgr:rollup-qv64hg6, r=matthiaskrgrbors-2/+2
Rollup of 6 pull requests Successful merges: - #129194 (Fix bootstrap test `detect_src_and_out` on Windows) - #129217 (safe transmute: check lifetimes) - #129223 ( Fix wrong argument for `get_fn_decl`) - #129235 (Check that `#[may_dangle]` is properly applied) - #129245 (Fix a typo in `rustc_hir` doc comment) - #129271 (Prevent double panic in query system, improve diagnostics) r? `@ghost` `@rustbot` modify labels: rollup
2024-08-19Auto merge of #128588 - onur-ozkan:clean-up-bootstrap-internals, ↵bors-56/+52
r=albertlarsan68 bootstrap minor improvements and clean-ups 3rd commit fixes https://github.com/rust-lang/rust/issues/128553#issuecomment-2266119948.
2024-08-19Rollup merge of #129194 - ChrisDenton:detect-src, r=Mark-SimulacrumMatthias Krüger-2/+2
Fix bootstrap test `detect_src_and_out` on Windows Fixes #129188 by making sure it's properly testing the right path for the platform.
2024-08-19fix broken bootstrap documentationonur-ozkan-1/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-08-19Auto merge of #128722 - tgross35:new-resolver-root, r=Mark-Simulacrumbors-97/+112
Switch to using the v2 resolver in most workspaces Pinning the resolver to v1 was done in 5abff3753a7c ("Explicit set workspace.resolver ...") in order to suppress warnings. Since there is no specific reason not to use the new resolver and since it fixes issues, change to `resolver = "2"` everywhere except library.
2024-08-18Rollup merge of #129116 - Zalathar:compiler-rt, r=Mark-SimulacrumTrevor Gross-1/+14
Include a copy of `compiler-rt` source in the `download-ci-llvm` tarball This will make it possible to experiment with allowing `download-ci-llvm` builds to build `library/profiler_builtins`, without needing to check out the `src/llvm-project` submodule. By itself, this PR just adds the files to the tarball, but doesn't actually do anything with them. The idea is that once this is merged, it will then be much easier to proceed with work on the necessary bootstrap changes (using the real downloaded tarball), without having to rig up weird hacks to simulate downloading a modified tarball. --- Adding these files to the compressed tarballs appears to increase its size by a negligible amount (<1 MB out of 400/800+ MB). The uncompressed size is about 14 MB (out of 2+ GB for the whole tarball). (The excluded test files would have been another 35 MB.)
2024-08-18Run `cargo update` with the new v2 resolverTrevor Gross-96/+111
v2 resolves some dependencies differently, and we adjusted some dependency versions. Run `cargo update` to make sure everything is in sync.
2024-08-18Update some dependency versions that allow better licensingTrevor Gross-1/+1
With the new resolver, a few dependencies get brought in twice with different licenses. For example, all dependencies from `wasm-tools` gained Apache-2.0 and MIT options, and with the v2 resolver we were using one version from before and one version from after this change. This made tidy's license check difficult. Update some minimum versions to remove duplicate dependencies and smooth out license checking.
2024-08-18sync llvm submodule during config parseonur-ozkan-12/+16
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-08-18bypass `dry_run` if the command is `run_always`onur-ozkan-1/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-08-18move `Build::update_submodule` to `Config::update_submodule`onur-ozkan-116/+122
During config parsing, some bootstrap logic (e.g., `download-ci-llvm`) checks certain sources and acts based on their state. This means that if path is a git submodule, bootstrap needs to update it before checking its state. Otherwise it may make incorrect assumptions by relying on outdated sources. To enable submodule updates during config parsing, we need to move the `update_submodule` function from the `Build` to `Config` instance, so we can access to it during the parsing process. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-08-18bootstrap: fix clean's `remove_dir_all` implementation许杰友 Jieyou Xu (Joe)-78/+15
... by using `std::fs::remove_dir_all`, which handles a bunch of edge cases including read-only files and symlinks which are extremely tricky on Windows.
2024-08-17Fix bootstrap test `detect_src_and_out` on WindowsChris Denton-2/+2
2024-08-16autoformat and remove unit testbinarycat-9/+1
2024-08-16bootstrap: improve error recovery flags to curlbinarycat-1/+38
alternative to #128459 fixes #110178
2024-08-16Auto merge of #129052 - onur-ozkan:better-incompatibility-check, r=Kobzolbors-98/+164
detect incompatible CI rustc options more precisely Previously, the logic here was simply checking whether the option was set in `config.toml`. This approach was not manageable in our CI runners as we set so many options in config.toml. In reality, those values are not incompatible since they are usually the same value used to generate the CI rustc. Now, the new logic compares the configuration values with the values used to generate the CI rustc, so we get more precise results and make the process more manageable. r? Kobzol Blocker for https://github.com/rust-lang/rust/pull/122709
2024-08-16bootstrap: fix trying to modify file times on read-only file on Windows许杰友 Jieyou Xu (Joe)-11/+45
2024-08-15Print more verbose error for commands that capture outputJakub Beránek-4/+32
2024-08-15Include a copy of `compiler-rt` source in the `download-ci-llvm` tarballZalathar-1/+14
2024-08-14disable download-rustc if CI rustc has unsupported optionsonur-ozkan-19/+38
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-08-14leave a FIXME note for `--set` flags coverageonur-ozkan-0/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-08-14improve `config::check_incompatible_options_for_ci_rustc` logsonur-ozkan-6/+11
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-08-14fix the incorrect `unpack`ing logiconur-ozkan-1/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>