about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2024-10-15update STAGE0_MISSING_TARGETSJosh Stone-4/+0
2024-10-15fix missing rustfmt for apple darwinGiang Dao-3/+9
2024-10-15fix missing rustfmt and clippy for msiGiang Dao-1/+30
2024-10-15Fix most ui tests on emscripten targetHood Chatham-0/+3
To fix the linker errors, we need to set the output extension to `.js` instead of `.wasm`. Setting the output to a `.wasm` file puts Emscripten into standalone mode which is effectively a distinct target. We need to set the runner to be `node` as well. This fixes most of the ui tests. I fixed a few more tests with simple problems: - `intrinsics/intrinsic-alignment.rs` and `structs-enums/rec-align-u64.rs` -- Two `#[cfg]` macros match for Emscripten so we got a duplicate definition of `mod m`. - `issues/issue-12699.rs` -- Seems to hang so I disabled it - `process/process-sigpipe.rs` -- Not expected to work on Emscripten so I disabled it
2024-10-13Auto merge of #131662 - matthiaskrgr:rollup-r1wkfxw, r=matthiaskrgrbors-12/+32
Rollup of 8 pull requests Successful merges: - #130356 (don't warn about a missing change-id in CI) - #130900 (Do not output () on empty description) - #131066 (Add the Chinese translation entry to the RustByExample build process) - #131067 (Fix std_detect links) - #131644 (Clean up some Miri things in `sys/windows`) - #131646 (sys/unix: add comments for some Miri fallbacks) - #131653 (Remove const trait bound modifier hack) - #131659 (enable `download_ci_llvm` test) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-13Auto merge of #131560 - cuviper:start-1.84, r=cuviperbors-6/+11
Bump to 1.84 https://forge.rust-lang.org/release/process.html#bump-the-stable-version-number-t-6-days-friday-the-week-before r? ghost
2024-10-13Rollup merge of #131659 - onur-ozkan:llvm-test, r=albertlarsan68Matthias Krüger-5/+15
enable `download_ci_llvm` test This was ignored because it caused merge failures on [LLVM update PR](https://github.com/rust-lang/rust/pull/131448). The issue was not checking `is_ci_llvm_available` in the test which is crucial for enabling CI LLVM: https://github.com/rust-lang/rust/blob/2aa26d8a722cf8810b27538c24b93d29324d4ac7/src/bootstrap/src/core/config/config.rs#L2835-L2844
2024-10-13Rollup merge of #131067 - ismailarilik:fix-std-detect-links, r=albertlarsan68Matthias Krüger-0/+4
Fix std_detect links This PR aims to fix this issue: https://github.com/rust-lang/rust/issues/96506 Fixes #96506
2024-10-13Rollup merge of #131066 - Binlogo:build-doc/rbe-add-zh-entry, r=albertlarsan68Matthias Krüger-1/+1
Add the Chinese translation entry to the RustByExample build process Following the guidelines outlined at [https://github.com/rust-lang/rust-by-example/blob/master/TRANSLATING.md](https://github.com/rust-lang/rust-by-example/blob/master/TRANSLATING.md), I am adding a Chinese translation to Rust by Example. You can view the related pull request here: [https://github.com/rust-lang/rust-by-example/pull/1886#issue-2537891289](https://github.com/rust-lang/rust-by-example/pull/1886#issue-2537891289). For similar issues and PRs, see [https://github.com/rust-lang/rust/issues/124641](https://github.com/rust-lang/rust/issues/124641) and [https://github.com/rust-lang/rust/pull/124731](https://github.com/rust-lang/rust/pull/124731).
2024-10-13Rollup merge of #130900 - capickett:empty-description-rust-version, ↵Matthias Krüger-3/+5
r=albertlarsan68 Do not output () on empty description When passing an explicitly empty description string, as explained here https://github.com/rust-lang/rust/blob/master/config.example.toml#L611-L613, my expectation is that the resulting rustc will be compatible with upstream. However, it seems that instead, a `()` is added to the end of the version string, causing the version compatibility check to fail. My proposed fix here would be to instead only print `({description})` if `description` is a non-empty string.
2024-10-13Rollup merge of #130356 - lolbinarycat:ci-no-change-id, r=albertlarsan68Matthias Krüger-3/+7
don't warn about a missing change-id in CI fixes #130352
2024-10-13check `stage0`, `channel` and `version` files for CI rustconur-ozkan-6/+11
These files have important role for compiler builds, so include them in the "if-unchanged" rustc logic. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-13enable `download_ci_llvm` testonur-ozkan-5/+15
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-13bootstrap: register `src/tools/unicode-table-generator` as a runnable tool许杰友 Jieyou Xu (Joe)-0/+24
2024-10-12Rollup merge of #131334 - heiher:loong-sanitizers, r=Mark-SimulacrumTrevor Gross-0/+3
Enable sanitizers for loongarch64-unknown-* Enable sanitizers for `loongarch64-unknown-linux-{gnu,musl,ohos}` targets.
2024-10-12Rollup merge of #130965 - onur-ozkan:bootstrap-step-trait-doc, r=Mark-SimulacrumMatthias Krüger-18/+22
make `Step` doc-comments more clear Aiming to improve complicated `Step` documentation. Once we merge this, I will update [this page](https://rustc-dev-guide.rust-lang.org/building/bootstrapping/how-bootstrap-does-it.html?highlight=Step#synopsis-of--step) too.
2024-10-12Auto merge of #131612 - tgross35:rollup-zy3yg4p, r=tgross35bors-12/+29
Rollup of 7 pull requests Successful merges: - #130870 (Add suggestion for removing invalid path sep `::` in fn def) - #130954 (Stabilize const `ptr::write*` and `mem::replace`) - #131233 (std: fix stdout-before-main) - #131590 (yeet some clones) - #131596 (mark InterpResult as must_use) - #131597 (Take a display name for `tool_check_step!`) - #131605 (`LLVMConstInt` only allows integer types) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-12Auto merge of #131448 - DianQK:fixes-131164, r=onur-ozkanbors-0/+2
Update LLVM submodule Fixes (maybe after beta backport) #131164. r? nikic
2024-10-12Ignore the `download_ci_llvm` testDianQK-0/+2
2024-10-12Take a display name for `tool_check_step!`许杰友 Jieyou Xu (Joe)-12/+29
2024-10-11Rollup merge of #131305 - onur-ozkan:131303, r=KobzolStuart Cook-33/+38
make `llvm::is_ci_llvm_modified` logic more precise Fixes #131303.
2024-10-10Auto merge of #131444 - onur-ozkan:hotfix-ci, r=Kobzolbors-28/+11
stabilize `ci_rustc_if_unchanged_logic` test Makes `ci_rustc_if_unchanged_logic` test more stable and re-enables it. Previously, it was expecting CI-rustc to be used all the time when there were no changes, which wasn’t always the case. Purpose of this test is making sure we don't use CI-rustc while there are changes in compiler and/or library, but we don't really need to cover cases where CI-rustc is not enabled. Second commit was pushed for making a change in the compiler tree, so `ci_rustc_if_unchanged_logic` can be tested properly in merge CI.
2024-10-10Rollup merge of #131442 - jieyouxu:mir-opt-rebuild, r=onur-ozkanMatthias Krüger-1/+5
Match std `RUSTFLAGS` for host and target for `mir-opt` test suite to fix double std build/rebuilds Previously the bootstrap compiletest `Step::run` flow had: ```rs // ensure that `libproc_macro` is available on the host. builder.ensure(compile::Std::new(compiler, compiler.host)); // ... if suite == "mir-opt" { builder.ensure(compile::Std::new_for_mir_opt_tests(compiler, target)); } else { builder.ensure(compile::Std::new(compiler, target)); } ``` This can cause unnecessary std rebuilds (even on the same invocation) because if host == target then `builder.ensure(compile::Std::new_for_mir_opt_tests(compiler, target))` will have different `RUSTFLAGS` than `builder.ensure(compile::Std::new(compiler, compiler.host))`. This PR fixes that by matching up std `RUSTFLAGS` if the test suite is `mir-opt`: ```rs if suite == "mir-opt" { builder.ensure(compile::Std::new_for_mir_opt_tests(compiler, compiler.host)); } else { builder.ensure(compile::Std::new(compiler, compiler.host)); } ``` This is a short-term fix, the better fix is to enforce how `RUSTFLAGS` are handled as described in https://github.com/rust-lang/rust/issues/131437#issuecomment-2401710727. Fixes #131437.
2024-10-10Auto merge of #131453 - onur-ozkan:llvm-ci-check-for-rustc-ci, r=Kobzolbors-0/+14
disable `download-rustc` if LLVM submodule has changes in CI We can't use CI rustc while using in-tree LLVM (which happens in LLVM submodule update PRs) and this PR handles that by ignoring CI-rustc in CI and failing in non-CI environments.
2024-10-10stabilize `ci_rustc_if_unchanged_logic` testonur-ozkan-28/+11
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-10stabilize `download_ci_llvm` testonur-ozkan-22/+14
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-10make `llvm::is_ci_llvm_modified` logic more preciseonur-ozkan-11/+24
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-10disable `download-rustc` if LLVM submodule has changes in CIonur-ozkan-0/+14
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-09Auto merge of #131461 - onur-ozkan:ignore-ci-rustc-change-test, r=onur-ozkanbors-0/+2
ignore `ci_rustc_if_unchanged_logic` test Temporary hotfix for unblocking CI. r? ghost
2024-10-09ignore `ci_rustc_if_unchanged_logic` testonur-ozkan-0/+2
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-09Match std RUSTFLAGS for host and target for `mir-opt` test许杰友 Jieyou Xu (Joe)-1/+5
2024-10-09Rename `profiler_support` to `profiler_runtime` throughout compiletestZalathar-1/+1
2024-10-09fix `ci_rustc_if_unchanged_logic` testonur-ozkan-1/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-08Auto merge of #131155 - jieyouxu:always-kill, r=onur-ozkanbors-6/+40
Prevent building cargo from invalidating build cache of other tools due to conditionally applied `-Zon-broken-pipe=kill` via tracked `RUSTFLAGS` This PR fixes #130980 where building cargo invalidated the tool build caches of other tools (such as rustdoc) because `-Zon-broken-pipe=kill` was conditionally passed via `RUSTFLAGS` for other tools *except* for cargo. The differing `RUSTFLAGS` triggered tool build cache invalidation as `RUSTFLAGS` is a tracked env var -- any changes in `RUSTFLAGS` requires a rebuild. `-Zon-broken-pipe=kill` is load-bearing for rustc and rustdoc to not ICE on broken pipes due to usages of raw std `println!` that panics without the flag being set, which manifests in ICEs. I can't say I like the changes here, but it is what it is... See detailed discussions and history of `-Zon-broken-pipe=kill` usage in https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Internal.20lint.20for.20raw.20.60print!.60.20and.20.60println!.60.3F/near/474593815. ## Approach This PR fixes the tool build cache invalidation by informing the `rustc` binary shim when to apply `-Zon-broken-pipe=kill` (i.e. when the rustc binary shim is not used to build cargo). This information is not communicated by `RUSTFLAGS`, which is an env var tracked by cargo, and instead uses an untracked env var `UNTRACKED_BROKEN_PIPE_FLAG` so we won't trigger tool build cache invalidation. We preserve bootstrap's behavior of not setting that flag for cargo by conditionally omitting setting `UNTRACKED_BROKEN_PIPE_FLAG` when building cargo. Notably, the `-Zon-broken-pipe=kill` instance in https://github.com/rust-lang/rust/blob/1e5719bdc40bb553089ce83525f07dfe0b2e71e9/src/bootstrap/src/core/build_steps/compile.rs#L1058 is not modified because that is used to build rustc only and not cargo itself. Thanks to `@cuviper` for the idea! ## Testing ### Integration testing This PR introduces a run-make test for rustc and rustdoc that checks that when they do not ICE/panic when they encounter a broken pipe of the stdout stream. I checked this test will catch the broken pipe ICE regression for rustc on Linux (at least) by commenting out https://github.com/rust-lang/rust/blob/1e5719bdc40bb553089ce83525f07dfe0b2e71e9/src/bootstrap/src/core/build_steps/compile.rs#L1058, and the test failed because rustc ICE'd. ### Manual testing I have manually tried: 1. `./x clean && `./x test build --stage 1` -> `rustc +stage1 --print=sysroot | false`: no ICE. 2. `./x clean` -> `./x test run-make` twice: no stage 1 cargo rebuilds. 3. `./x clean` -> `./x build rustdoc` -> `rustdoc +stage1 --version | false`: no panics. 4. `./x test src/tools/cargo`: tests pass, notably `build::close_output` and `cargo_command::closed_output_ok` do not fail which would fail if cargo was built with `-Zon-broken-pipe=kill`. ## Related discussions Thanks to everyone who helped! - https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/Applying.20.60-Zon-broken-pipe.3Dkill.60.20flags.20in.20bootstrap.3F - https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/Modifying.20run-make.20tests.20unnecessarily.20rebuild.20stage.201.20.2E.2E.2E - https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Internal.20lint.20for.20raw.20.60print!.60.20and.20.60println!.60.3F Fixes https://github.com/rust-lang/rust/issues/130980 Closes https://github.com/rust-lang/rust/issues/131059 --- try-job: aarch64-apple try-job: x86_64-msvc try-job: x86_64-mingw
2024-10-08force `download-rustc=if-unchanged` for x86_64-gnu-tools runneronur-ozkan-11/+10
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-08fix `ci_rustc_if_unchanged_logic` testonur-ozkan-15/+15
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-08fail on {dist, install} subcommand if download-rustc is enabledonur-ozkan-0/+9
2024-10-08improve ci-rustc finding logiconur-ozkan-4/+25
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-08use if-unchanged only when ci rustc is availableonur-ozkan-9/+57
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-08add test for ci rustc's if-unchanged logiconur-ozkan-1/+50
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-08Add regression test for rustc/rustdoc broken pipe ICEs许杰友 Jieyou Xu (Joe)-4/+2
2024-10-07Use untracked env var to pass `-Zon-broken-pipe=kill` for tools许杰友 Jieyou Xu (Joe)-6/+42
- Don't touch rustc's `-Zon-broken-pipe=kill` env var in `compile.rs`. - Use an untracked env var to pass `-Zon-broken-pipe=kill` for tools but skip cargo still, because cargo wants `-Zon-broken-pipe=kill` unset.
2024-10-07Rollup merge of #131351 - jieyouxu:yeet-the-valgrind, r=KobzolJubilee-8/+0
Remove valgrind test suite and support from compiletest, bootstrap and opt-dist The `run-pass-valgrind` test suite is not exercised in CI, and as far as I'm aware nobody runs it (asked in https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Are.20the.20valgrind.20tests.20even.20used.20by.20anyone.3F). What's remaining of valgrind support in compiletest isn't even properly hooked up with bootstrap. The existing valgrind logic in compiletest is also straight up questionable, i.e. https://github.com/rust-lang/rust/blob/1b3b8e7b0265162853c650ead09905bc3cdaeae9/src/tools/compiletest/src/runtest/valgrind.rs#L7-L12 It just runs valgrind tests as `rpass` if no valgrind path is provided to compiletest from bootstrap -- but bootstrap doesn't even pass a valgrind path to compiletest in the first place, so this always ran as `rpass` tests. So what is this even testing? So if it's not testing anything, let's delete it. Closes #44816 by deleting the test suite :3 <img src="https://github.com/user-attachments/assets/99525bf7-e85b-40ba-9281-e4e1e275c4e8" width=300 />
2024-10-07Rollup merge of #130899 - bjorn3:wasi_bootstrap_fixes, r=davidtwcoJubilee-3/+19
Couple of changes to make it easier to compile rustc for wasm This is a subset of the patches I have on my rust fork to compile rustc for wasm32-wasip1.
2024-10-07Rollup merge of #130479 - ↵Jubilee-2/+5
onur-ozkan:llvm-bitcode-linker-multiple-candidates, r=Kobzol skip in-tree compiler build for llvm-bitcode-linker if ci-rustc is on Similar to https://github.com/rust-lang/rust/issues/108767, resolves the `multiple candidates` problem for ci-rustc. See https://github.com/rust-lang/rust/pull/122709#issuecomment-2355436227 for more context. Blocker for #122709.
2024-10-07Remove valgrind test suite support from bootstrap许杰友 Jieyou Xu (Joe)-8/+0
2024-10-06Revert "Rollup merge of #129584 - lolbinarycat:old-upstream-warning, ↵onur-ozkan-12/+1
r=albertlarsan68" This reverts commit 776187d2c9a42dc07452ae36a8b765d66bd8e2ca, reversing changes made to 7d015575ada1de8a4627fcdea416194a57a175c2.
2024-10-06Revert "Auto merge of #130121 - ↵onur-ozkan-1/+9
lolbinarycat:bootstrap-warn-old-upstream-worktree, r=albertlarsan68" This reverts commit 507c05bead4026ed8841512095b4218119eb479f, reversing changes made to 0609062a91c8f445c3e9a0de57e402f9b1b8b0a7.
2024-10-06Auto merge of #131320 - matthiaskrgr:rollup-tom15b3, r=matthiaskrgrbors-14/+49
Rollup of 5 pull requests Successful merges: - #129392 (Do not consider match/let/ref of place that evaluates to `!` to diverge, disallow coercions from them too) - #131279 (update "build/host" symlink comment) - #131312 (On function and method calls in patterns, link to the book) - #131315 (bootstrap: add `std_features` config) - #131316 (Fix typo in primitive_docs.rs) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-06Rollup merge of #131315 - shrirambalaji:issue-129599-fix-shrirambalaji, ↵Matthias Krüger-13/+48
r=onur-ozkan bootstrap: add `std_features` config Adding support for a std-features config under the rust section in config.toml during bootstrap. This allows rustc devs to build with specific feature flags for local development.