about summary refs log tree commit diff
path: root/src/bootstrap
AgeCommit message (Collapse)AuthorLines
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
2025-01-16Add license-metadata.json to rustc-src tarball.Jonathan Pallant-0/+1
2025-01-16resolve symlinks of LLVM tool binaries before copying themonur-ozkan-1/+15
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. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-15Auto merge of #135540 - GuillaumeGomez:rollup-40lfb7l, r=GuillaumeGomezbors-2/+0
Rollup of 6 pull requests Successful merges: - #132654 (std: lazily allocate the main thread handle) - #135003 (deprecate `std::intrinsics::transmute` etc, use `std::mem::*` instead) - #135428 (rustdoc: Remove `AttributesExt` trait magic that added needless complexity) - #135498 (Prefer lower `TraitUpcasting` candidates in selection) - #135507 (TRPL: incorporate all backward-compatible Edition changes) - #135529 (remove outdated FIXME) r? `@ghost` `@rustbot` modify labels: rollup
2025-01-15Auto merge of #133461 - ferrocene:add-copyright-files-to-dist, r=Kobzolbors-10/+22
Add COPYRIGHT-*.html files to distribution and update `COPYRIGHT` * Updates the `COPYRIGHT` file to describe how we actually do things now, and removes the licence text from it as they are stored elsewhere. * dist tarballs get all of the files in `LICENSES/*`. * This folder is managed by `reuse` and each file exists because we refer to the licence somewhere in our tree. We should be supplying these licence texts to anyone who obtains a copy of the source code and now we do. * The binary rust tarball gets `COPYRIGHT.html` and `COPYRIGHT-library.html`, which are auto-generated files that describe the licence information for both the in-tree source files used to build the Rust toolchain, and the out-of-tree dependencies we used to build the toolchain. * The other binary tarballs are unchanged, for now. In future you need to make a call whether to ship multiple version of COPYRIGHT.html, or whether to try and make, for example, a cargo-specific COPYRIGHT.html file. * The `LICENSE-MIT` file now includes a blanket copyright statement, as the text indicates that it should and because users will expect to know who owns the copyright of the material they have been given (even if the answer is 'lots of people'). try-job: x86_64-fuchsia
2025-01-15Rollup merge of #135529 - onur-ozkan:outdated-fixme, r=jieyouxuGuillaume Gomez-2/+0
remove outdated FIXME https://github.com/rust-lang/rust/pull/134967 already fixed this.
2025-01-15remove outdated FIXMEonur-ozkan-2/+0
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-14Rollup merge of #134913 - rhelmot:master, r=jieyouxuJubilee-34/+17
bootstrap: do not rely on LIBRARY_PATH env variable Closes https://github.com/rust-lang/rust/issues/134811 try-job: test-various try-job: armhf-gnu try-job: x86_64-apple-1 try-job: x86_64-apple-2 try-job: aarch64-apple try-job: x86_64-msvc try-job: i686-msvc try-job: x86_64-mingw-1 try-job: x86_64-mingw-2 try-job: i686-mingw
2025-01-14Run clippy for rustc_codegen_gccJakub Beránek-6/+19
2025-01-14Add missing closing backtick in commit hook message 🐸Yotam Ofek-1/+1
2025-01-13Rollup merge of #135452 - jieyouxu:fix-comment, r=compiler-errorsJacob Pratt-1/+1
bootstrap: fix outdated feature name in comment Follow-up to https://github.com/rust-lang/rust/pull/135391#discussion_r1912826594. I guess I updated everything else **except** the comment right next to the actual dependencies 💀 r? bootstrap
2025-01-14bootstrap: fix outdated feature name in comment许杰友 Jieyou Xu (Joe)-1/+1
2025-01-13Mark rustbook as an external toolEric Huss-1/+5
It has been a bit of a pain trying to keep the lints in sync across the submodule repositories, so the just turns it off.
2025-01-13Rollup merge of #135391 - jieyouxu:conditional-tracing, r=onur-ozkanJacob Pratt-6/+237
bootstrap: Implement conditional `tracing` infra Add a conditional `tracing` setup that is gated behind `BOOTSTRAP_TRACING` env var. This `tracing` infra is implemented by: - Introducing an optional `tracing` cargo feature in bootstrap. - Added optional `tracing*` dependencies which are gated behind the `tracing` cargo feature. - When `BOOTSTRAP_TRACING` is set, `bootstrap.py` will build bootstrap with `--features=tracing`. There is a small trick here to share `BOOTSTRAP_TRACING` env var without having to add a separate env var: - `BOOTSTRAP_TRACING=1` is not a registered `tracing` filter target, so that can be used to enable the `tracing` cargo feature yet not actually enable any tracing logs (useful for editor r-a setups without actually outputting any tracing logs). - `BOOTSTRAP_TRACING=TRACE` and such are actually valid `tracing` filters, but that sets `BOOTSTRAP_TRACING` anyway. Example usage: https://github.com/rust-lang/rust/pull/135299 (that experimental PR is not conditionally gated) This PR is intentionally kept minimal to focus on the infra itself. To get actual mileage, instrumentations will need to be added to individual `Step`s and such. r? `@onur-ozkan` (or reroll)
2025-01-13Rollup merge of #135386 - lolbinarycat:bootstrap-test-cleanup, r=jieyouxuJacob Pratt-5/+5
clean up code related to the rustdoc-js test suite r? `@jieyouxu`
2025-01-13Rollup merge of #135355 - ranger-ross:improved-ci-logs, r=onur-ozkanJacob Pratt-3/+49
ci: added test log format for ci This PR adds a new test render format specifically for ci. The goal as stated in #134910 is to make reviewing test failures in CI easier. See the new test output format in the CI for this PR ([here](https://github.com/rust-lang/rust/actions/runs/12723914643/job/35469515397?pr=135355)) closes #134910 cc: `@jyn514`
2025-01-12bootstrap: do not rely on LIBRARY_PATH env variableAudrey Dutcher-34/+17
Clang will not respect this value in cross configurations.
2025-01-13bootstrap.py: build bootstrap binary with `--features=tracing` if ↵许杰友 Jieyou Xu (Joe)-0/+4
`BOOTSTRAP_TRACING` env var is set