about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
2025-01-28Auto merge of #135832 - Kobzol:rustdoc-lto, r=onur-ozkanbors-9/+29
Apply LTO config to rustdoc Before, the LTO configuration from `config.toml` was not applied to `rustdoc`. This provides a small perf. and binary size [win](https://github.com/rust-lang/rust/pull/112049#issuecomment-2605131041) for doc builds. Since this is configured with Cargo profiles and not rustflags, it should not break tool build cache (https://github.com/rust-lang/rust/pull/131155). I tried to run `x test miri`, `x test rustdoc` and `x test miri` and nothing was rebuilt. r? `@onur-ozkan`
2025-01-27Auto merge of #136116 - fmease:rollup-c8pk3mj, r=fmeasebors-18/+107
Rollup of 8 pull requests Successful merges: - #126604 (Uplift `clippy::double_neg` lint as `double_negations`) - #135158 (Add `TooGeneric` variant to `LayoutError` and emit `Unknown`) - #135635 (Move `std::io::pipe` code into its own file) - #136072 (add two old crash tests) - #136079 (compiler_fence: fix example) - #136091 (Add some tracing to core bootstrap logic) - #136097 (rustc_ast: replace some len-checks + indexing with slice patterns etc.) - #136101 (triagebot: set myself on vacation) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-27Auto merge of #135937 - bjorn3:separate_coretests_crate, r=jieyouxu,tgross35bors-4/+4
Put the core unit tests in a separate coretests package Having standard library tests in the same package as a standard library crate has bad side effects. It causes the test to have a dependency on a locally built standard library crate, while also indirectly depending on it through libtest. Currently this works out fine in the context of rust's build system as both copies are identical, but for example in cg_clif's tests I've found it basically impossible to compile both copies with the exact same compiler flags and thus the two copies would cause lang item conflicts. This PR moves the tests of libcore to a separate package which doesn't depend on libcore, thus preventing the duplicate crates even when compiler flags don't exactly match between building the sysroot (for libtest) and building the test itself. The rest of the standard library crates do still have this issue however.
2025-01-27bootstrap: add more logging许杰友 Jieyou Xu (Joe)-2/+93
2025-01-27bootstrap: adjust config file cascading fallback comment许杰友 Jieyou Xu (Joe)-1/+5
2025-01-27bootstrap: adjust tracing style许杰友 Jieyou Xu (Joe)-11/+6
2025-01-27bootstrap: avoid glob imports in `main` binary许杰友 Jieyou Xu (Joe)-5/+4
2025-01-26Put all coretests in a separate cratebjorn3-4/+4
2025-01-26Rollup merge of #133631 - flba-eb:add_nto_qnx71_iosock_support, r=workingjubileeJacob Pratt-0/+4
Support QNX 7.1 with `io-sock`+libstd and QNX 8.0 (`no_std` only) Changes of this pull request: 1. Refactor code for qnx nto targets to share more code in file `nto_qnx.rs` 1. Add support for an additional network stack on nto qnx 7.1. QNX 7.1 supports two network stacks: 1. `io-pkt`, which is default 2. `io-sock`, which is optional on 7.1 but default in QNX 8.0 As one can see in the [io-sock migration notes](https://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.neutrino.io_sock/topic/migrate_app.html), this changes the libc API in a way similar to e.g. linux-gnu vs. linux-musl. This change adds a new target which has a different value for `target_env`, so that e.g. libc can distinguish between both APIs. 2. Add initial support for QNX 8.0, thanks to AkhilTThomas. As it turned out, the problem with forking many processes still exists in QNX 8.0. Because if this, we are now using it for any QNX version (i.e. not check for `target_env` anymore).
2025-01-25Auto merge of #119286 - jyn514:linker-output, r=bjorn3bors-3/+19
show linker output even if the linker succeeds Show stderr and stderr by default, controlled by a new `linker_messages` lint. fixes https://github.com/rust-lang/rust/issues/83436. fixes https://github.com/rust-lang/rust/issues/38206. cc https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/uplift.20some.20-Zverbose.20calls.20and.20rename.20to.E2.80.A6.20compiler-team.23706/near/408986134 <!-- try-job: dist-x86_64-msvc --> try-job: aarch64-apple r? `@bjorn3`
2025-01-25Rollup merge of #136029 - ChrisDenton:py-job, r=jieyouxuMatthias Krüger-50/+4
Bootstrap: Don't move ownership of job object I've been thinking about this since the last time I looked at bootstrap's use of job objects. We currently pass ownership of the job object to Python. I feel this is unneeded complexity. The rationale given (in a comment) is that it helps with `ctrl-c` on `x.py`. But using `ctrl-c` when running `x.py` will also cause `bootstrap.exe` to immediately exit so I don't find that convincing.
2025-01-24Don't move ownership of job objectChris Denton-50/+4
2025-01-24bootstrap: Handle bootstrap lockfile race condition betterclubby789-1/+3
2025-01-24Ignore linker warnings on macOS for ui-fulldepsjyn-3/+10
ld is showing things like this: ``` ld: ignoring duplicate libraries: '-lm' ``` I don't have time or a macbook that lets me investigate these. Just silence them for now.
2025-01-24add nto80 x86-64 and aarch64 targetAkhilTThomas-0/+2
Signed-off-by: Florian Bartels <Florian.Bartels@elektrobit.com>
2025-01-24Add support for QNX 7.1 with io-sock on x64Florian Bartels-0/+1
Signed-off-by: Florian Bartels <Florian.Bartels@elektrobit.com>
2025-01-24Add new target for supporting Neutrino QNX 6.1 with `io-socket` network ↵Florian Bartels-0/+1
stack on aarch64 Signed-off-by: Florian Bartels <Florian.Bartels@elektrobit.com>
2025-01-24Rollup merge of #135638 - Kobzol:gcc-ci, r=onur-ozkanMatthias Krüger-4/+50
Make it possible to build GCC on CI This is the first step towards eventually enabling download of precompiled GCC from our CI. Currently, we prebuild `libgccjit` on CI and cache it in Docker. This PR improves the bootstrap GCC step to make it work on CI, and also to make it faster by using sccache. After this change, an actual build on CI should take only 2-3 minutes. Note that this PR does not yet remove the `build-gccjit.sh` script and replace it with the bootstrap step, I'll leave that to a follow-up PR. The added `flex` package and the ZSTD library fix were needed to make GCC build on CI. CC ``````@GuillaumeGomez`````` r? ``````@onur-ozkan``````
2025-01-23Rollup merge of #135887 - onur-ozkan:testing-improvements, r=jieyouxuMatthias Krüger-65/+37
improvements on `build_steps::test` implementation Reviewing commits one-by-one should make it easier to understand.
2025-01-23Rollup merge of #135879 - onur-ozkan:invalid-file-path, r=jieyouxuMatthias Krüger-1/+1
fix outdated file path ref in llvm This was added years ago and is outdated today.
2025-01-22reduce number of `prepare_cargo_test` argsonur-ozkan-8/+7
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-22resolve clippy FIXMEonur-ozkan-52/+14
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-22make bootstrap self test to use bootstrap cargoonur-ozkan-15/+26
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-22fix outdated file path ref in llvmonur-ozkan-1/+1
This was added years ago and is outdated today. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-22Apply LTO config to rustdocJakub Beránek-9/+29
Before, the LTO configuration from `config.toml` was not applied to `rustdoc`.
2025-01-21bump bootsrap windows to 0.57klensy-23/+4
2025-01-21Make it possible to build GCC on CIJakub Beránek-4/+50
This is the first step to enable download of precompiled GCC
2025-01-21Auto merge of #135632 - marcoieni:split-x86_64-msvc-2025, r=Kobzolbors-6/+2
CI: split x86_64-msvc job using windows 2025 try-job: x86_64-msvc-1 try-job: x86_64-msvc-2 try-job: dist-x86_64-msvc
2025-01-20ignore linker errors on all platformsjyn-0/+9
2025-01-20Rollup merge of #135658 - Kobzol:src-tarball-remove-gcc, r=jieyouxu许杰友 Jieyou Xu (Joe)-1/+12
Do not include GCC source code in source tarballs The licensing story is unclear, it makes the archive much larger, and we should not need it for building anything in the tarballs (yet). ``` Before: 121s building the archive 1.3 GiB gzipped size 5.7 GiB extracted size 402519 extracted files After: 64s building the archive 961 MiB gzipped size 4.5 GiB extracted size 257719 extracfed files ``` Fixes: https://github.com/rust-lang/rust/issues/135606 r? `@ehuss`
2025-01-20Rollup merge of #135433 - tanvincible:patch-1, r=onur-ozkan许杰友 Jieyou Xu (Joe)-4/+7
Add Profile Override for Non-Git Sources ## PR description - Fixes #135358 This PR introduces the following updates to 1. `bootstrap.py`: - If the `profile` is `None` and the source is non-git, the `profile` is automatically overridden to `"dist"`. - Ensures that options like `download-ci-llvm` and `download-rustc` are not used with non-git sources. An exception is raised if these options are present in the configuration when the source is non-git. 2. `bootstrap_test.py` - Added unit tests to verify both the profile override mechanism and the assertion for restricted options. These tests ensure the correct behavior for non-git sources and the handling of `if-unchanged` options. r? `@onur-ozkan` `@rustbot` T-bootstrap
2025-01-20Add logic to override profile for non git sourcesTanvi Pooranmal Meena-4/+7
2025-01-20Rollup merge of #135729 - Noratrieb:compiler-profile-debug-assert, r=lqd许杰友 Jieyou Xu (Joe)-0/+7
Add debug assertions to compiler profile Working on the compiler without debug assertions is not a very productive way to work on the compiler.
2025-01-20Rollup merge of #135722 - onur-ozkan:handle-tarball-ci-commit, r=jieyouxu许杰友 Jieyou Xu (Joe)-13/+23
make it possible to use ci-rustc on tarball sources Previously, bootstrap was using `Config::last_modified_commit` unconditionally to figure the commit to download precompiled rustc artifact from CI, which was leading builds to fail on tarball sources as `Config::last_modified_commit` requires `git` to be present in the project source. This change makes bootstrap to call `Config::last_modified_commit` only when it's running on git-managed source and read `git-commit-hash` file otherwise.
2025-01-19Add debug assertions to compiler profileNoratrieb-0/+7
Working on the compiler without debug assertions is not a very productive way to work on the compiler.
2025-01-19CI: split x86_64-msvc job using windows 2025MarcoIeni-6/+2
2025-01-19make it possible to use ci-rustc on tarball sourcesonur-ozkan-13/+23
Previously, bootstrap was using `Config::last_modified_commit` unconditionally to figure the commit has to download precompiled rustc artifact from CI, which was leading builds to fail on tarball sources as `Config::last_modified_commit` requires `git` to be present in the project source. This change makes bootstrap to call `Config::last_modified_commit` only when it's running on git-managed source and read `git-commit-hash` file otherwise. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-19Rollup merge of #135616 - marcoieni:split-i686-msvc-job, r=KobzolMatthias Krüger-2/+11
CI: split i686-msvc job to two free runners try-job: i686-msvc-1 try-job: i686-msvc-2
2025-01-18Auto merge of #135682 - matthiaskrgr:rollup-cl7zlt1, r=matthiaskrgrbors-13/+30
Rollup of 7 pull requests Successful merges: - #133700 (const-eval: detect more pointers as definitely not-null) - #135290 (Encode constraints that hold at all points as logical edges in location-sensitive polonius) - #135478 (Run clippy for rustc_codegen_gcc on CI) - #135583 (Move `std::pipe::*` into `std::io`) - #135612 (Include x scripts in tarballs) - #135624 (ci: mirror buildkit image to ghcr) - #135661 (Stabilize `float_next_up_down`) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-18Rollup merge of #135612 - onur-ozkan:include-x-scripts-in-tarballs, r=clubby789Matthias Krüger-7/+11
Include x scripts in tarballs Helps to provide 1:1 build experience between git-managed and tarball sources.
2025-01-18Rollup merge of #135478 - Kobzol:gcc-clippy, r=onur-ozkanMatthias Krüger-6/+19
Run clippy for rustc_codegen_gcc on CI Requested on [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Run.20clippy.20for.20rustc_codegen_gcc.20in.20the.20Rust.20CI). Opening as a draft, since it's not clear which rules should be applied to it. r? `@ghost`
2025-01-17Do not include GCC source code in source tarballsJakub Beránek-1/+12
The licensing story is unclear, it makes the archive much larger, and we should not need it for building anything in the tarballs (yet).
2025-01-17add src/librustdoc and src/rustdoc-json-types to ↵binarycat-0/+2
RUSTC_IF_UNCHANGED_ALLOWED_PATHS fixes https://github.com/rust-lang/rust/issues/135650
2025-01-17include `x` and `x.ps1` scripts in tarball sourcesonur-ozkan-0/+2
Helps to provide 1:1 build experience between git-managed and tarball sources. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-17CI: split i686-msvc job to two free runnersMarcoIeni-2/+11
2025-01-17add tidy check on dist src files orderonur-ozkan-7/+9
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-17Auto merge of #135605 - jieyouxu:temp-require-force-rustdoc-js, r=clubby789bors-4/+1
bootstrap: still require `COMPILETEST_FORCE_STAGE0` for `./x test rustdoc-js --stage 0` This PR reverts #135375, because through some more testing I found out `./x test rustdoc-js --stage 0` does not in fact build rustdoc, and all the tests fail. This can't be intended behavior, so at least require `COMPILETEST_FORCE_STAGE0` to make it less likely to run `rustdoc-js --stage 0` by accident. The problem that `--stage 0` is not working at all for this rustdoc-js test suite is tracked over at #135603. cc `@lolbinarycat` r? bootstrap
2025-01-17compiletest: require `COMPILETEST_FORCE_STAGE0` for `./x test rustdoc-js ↵许杰友 Jieyou Xu (Joe)-4/+1
--stage 0`
2025-01-16Rollup merge of #135588 - ferrocene:add-license-json-to-source-tarball, r=KobzolMatthias Krüger-0/+1
Add license-metadata.json to rustc-src tarball. Adds a license-metadata.json to the source tarball. This file was reported as missing as a comment on #133461, and it prevents you building the compiler from the source tarball (unless you re-generate it yourself, which is non-obvious and requires `reuse` to be installed). r? Kobzol
2025-01-16Rollup merge of #135585 - onur-ozkan:135554, r=KobzolMatthias Krüger-1/+15
resolve symlinks of LLVM tool binaries before copying them There is a chance that these tools are being installed from an external LLVM and we have no control over them. If any of these tools use symlinks, they will fail during tarball distribution. This change makes copying process to resolve symlinks just before placing them into the destination path. Fixes https://github.com/rust-lang/rust/issues/135554