about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2024-10-23Update rustbook to support new test linking in referenceEric Huss-1/+8
2024-10-23Rollup merge of #132054 - onur-ozkan:cargo-config, r=KobzolLeón Orell Valerian Liehr-3/+0
do not remove `.cargo` directory If vendoring isn't used bootstrap removes `.cargo` directory, which prevents developers from setting certain options in the `.cargo/config.toml` file. This was introduced in https://github.com/rust-lang/rust/pull/97513 (specifically in [this commit](https://github.com/rust-lang/rust/pull/97513/commits/345eb14f6c841cd38e76a5b0bbf99e1b94a90d40)). Also, since https://github.com/rust-lang/rust/pull/123942, vendoring is now possible even in git sources, which means we shouldn't remove `.cargo` directory in git sources anymore.
2024-10-23Rollup merge of #131181 - dev-ardi:custom-differ, r=jieyouxuLeón Orell Valerian Liehr-0/+14
Compiletest: Custom differ This adds support for a custom differ for compiletests. It’s purely visual and helps produce cleaner output when UI tests fail. I’m using an environment variable for now since it’s experimental and I don’t want to drill the cli arguments all the way down. Also did a bit of general cleanup while I was at it. This is how it looks [with debug info silenced](https://github.com/rust-lang/rust/pull/131182) (#131182) `COMPILETEST_DIFF_TOOL="/usr/bin/env difft --color always --background light --display side-by-side" ./x test tests/ui/parser` ![image](https://github.com/user-attachments/assets/f740ce50-7564-4469-be0a-86e24bc50eb8)
2024-10-23Refactor change detection for rustdoc and download-rustcguliwa-66/+23
2024-10-23do not remove `.cargo` directroyonur-ozkan-3/+0
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-22s/display-diff-tool/compiletest-diff-tool/Orion Gonzalez-7/+7
2024-10-22update CONFIG_CHANGE_HISTORYOrion Gonzalez-0/+5
2024-10-22implemented custom differOrion Gonzalez-0/+9
2024-10-22Rollup merge of #132006 - onur-ozkan:131947, r=jieyouxuMatthias Krüger-7/+9
don't stage-off to previous compiler when CI rustc is available Resolves the 4th item in [Tracking Issue for download-rustc improvements](https://github.com/rust-lang/rust/issues/131744).
2024-10-22Rollup merge of #131731 - lucarlig:master, r=onur-ozkanMatthias Krüger-3/+33
add `TestFloatParse` to `tools.rs` for bootstrap add TestFloatParse to tools for bootstrap, I am not sure this is what the issue https://github.com/rust-lang/rust/issues/128012 discussion wants. try-job: aarch64-apple
2024-10-21Rollup merge of #131954 - the8472:bootstrap-parallel-git, r=KobzolJubilee-14/+46
shave 150ms off bootstrap This starts `git` commands inside `GitInfo`and the submodule updates in parallel. Git should already perform internal locking in cases where it needs to serialize a modification. ``` OLD Benchmark #1: ./x check core Time (mean ± σ): 608.7 ms ± 4.4 ms [User: 368.3 ms, System: 455.1 ms] Range (min … max): 602.3 ms … 618.8 ms 10 runs NEW Benchmark #1: ./x check core Time (mean ± σ): 462.8 ms ± 2.6 ms [User: 350.2 ms, System: 485.1 ms] Range (min … max): 457.5 ms … 465.6 ms 10 runs ``` This should help with the rust-analyzer setup which issues many individual `./x check` calls. There's more that could be done but these were the lowest-hanging fruits that I saw.
2024-10-21don't stage-off to previous compiler when CI rustc is availableonur-ozkan-7/+9
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-21bootstrap: move `builder.rs` under `builder/` directory许杰友 Jieyou Xu (Joe)-0/+0
2024-10-21bootstrap: minor docs cleanup许杰友 Jieyou Xu (Joe)-12/+15
2024-10-21bootstrap: extract builder cargo to its own module许杰友 Jieyou Xu (Joe)-1211/+1226
I found builder.rs to be a massive file which made it hard to digest. To make `RUSTFLAGS` usage hardening easier later, I extracted the cargo part in `builder.rs` into its own module.
2024-10-20Rollup merge of #131926 - clubby789:configure-enable, r=KobzolMatthias Krüger-1/+2
Align boolean option descriptions in `configure.py` Boolean options are currently printed as ``` Options --enable-debug OR --disable-debug enables debugging environment; does not affect optimization of bootstrapped code --enable-docs OR --disable-docs build standard library documentation --enable-compiler-docs OR --disable-compiler-docs build compiler documentation --enable-optimize-tests OR --disable-optimize-tests build tests with optimizations --enable-verbose-tests OR --disable-verbose-tests enable verbose output when running tests --enable-ccache OR --disable-ccache invoke gcc/clang via ccache to reuse object files between builds --enable-sccache OR --disable-sccache invoke gcc/clang via sccache to reuse object files between builds --enable-local-rust OR --disable-local-rust use an installed rustc rather than downloading a snapshot --local-rust-root=VAL set prefix for local rust binary --enable-local-rebuild OR --disable-local-rebuild assume local-rust matches the current version, for rebuilds; implies local-rust, and is implied if local-rust already matches the current version ``` as of #131117 imo, this is a little difficult to skim. This PR changes this to align the `OR`s and push the description onto a newline: ``` Options --enable-debug OR --disable-debug enables debugging environment; does not affect optimization of bootstrapped code --enable-docs OR --disable-docs build standard library documentation --enable-compiler-docs OR --disable-compiler-docs build compiler documentation --enable-optimize-tests OR --disable-optimize-tests build tests with optimizations --enable-verbose-tests OR --disable-verbose-tests enable verbose output when running tests --enable-ccache OR --disable-ccache invoke gcc/clang via ccache to reuse object files between builds --enable-sccache OR --disable-sccache invoke gcc/clang via sccache to reuse object files between builds --enable-local-rust OR --disable-local-rust use an installed rustc rather than downloading a snapshot --local-rust-root=VAL set prefix for local rust binary --enable-local-rebuild OR --disable-local-rebuild assume local-rust matches the current version, for rebuilds; implies local-rust, and is implied if local-rust already matches the current version ```
2024-10-20Rollup merge of #131647 - jieyouxu:unicode-table-generator, r=Mark-SimulacrumMatthias Krüger-0/+24
Register `src/tools/unicode-table-generator` as a runnable tool It seems like `src/tools/unicode-table-generator` is not currently managed by bootstrap. This PR wires it up with bootstrap as a runnable tool. This tool seems to take two possible args: 1. (Mandatory) path to `library/core/src/unicode/unicode_data.rs`, and 2. (Optional) path to generate a test file. I only passed the mandatory path to `unicode_data.rs` in bootstrap and didn't do anything about (2). I'm not sure about how this tool is supposed to be run. `Cargo.lock` is modified because I renamed `unicode-table-generator`'s bin name to match the tool name, as bootstrap's tool running logic expects the bin name to be derived from the tool name. I also added a triagebot message to remind to not manually edit the library source file and edit the tool then regenerate instead, but this should probably be a tidy check (if that's desirable then that can be in a follow-up PR, though may be overkill). Helps with #131640 but does not close it because still no docs. r? `@Mark-Simulacrum` (since I think you authored this tool?)
2024-10-20Rollup merge of #131365 - heiseish:fix-issue-101993, r=Mark-SimulacrumMatthias Krüger-4/+39
Fix missing rustfmt in msi installer #101993 # Context - Fixed missing `rustfmt`, `clippy`, `miri` and `rust-analyzer` in msi installer - Fixed missing `rustfmt` for apple darwin installer - Closes #101993 r​? `@jyn514` - Please let me know if I should request from someone else instead. I divided the changes into 3 separate commits for the ease of review. The refactoring commit `fbdfd5c03c3c979bcf105ccdd05ff4ab9f37a763` is a bit more involved, but I think it helps in the long term for readability and to avoid bugs. - I changed `build-manifest` to `build_manifest` in order to invoke it as a library. Not sure if this is gonna break any upstream processes. I checked `generate-manifest-list` and `generate-release` but didn't find any obvious reference - Will push fixes for linting later
2024-10-20add TestFloatParse to tools for bootstraplucarlig-3/+33
2024-10-20run git commands in bootstrap in parallelThe 8472-14/+46
this saves about 150ms on many ./x invocations
2024-10-19Align boolean option descriptions in `configure.py`clubby789-1/+2
2024-10-19bootstrap: allow setting `--jobs` in config.toml许杰友 Jieyou Xu (Joe)-3/+68
2024-10-15Fix `clippy::needless-lifetimes` in bootstrapJosh Stone-7/+7
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>