Commit graph

6831 commits

Author SHA1 Message Date
León Orell Valerian Liehr
e6bd9e6928
Rollup merge of #137522 - onur-ozkan:137215-follow-ups, r=Kobzol
use stage 2 on cargo and clippy tests when possible

Follow-up for #137215.

For more context, read the discussion starting from https://github.com/rust-lang/rust/pull/137215#issuecomment-2674395959.

r? Kobzol (Feel free to re-r if you are not available).
2025-02-25 13:32:56 +01:00
León Orell Valerian Liehr
849a60a762
Rollup merge of #137460 - onur-ozkan:downgrade-cc, r=jieyouxu
downgrade bootstrap `cc`

Current `cc` version causing bootstrap to fail on custom targets. See https://github.com/rust-lang/cc-rs/issues/1317 for more context.

Fixes (after beta and stable backports): https://github.com/rust-lang/rust/issues/137064 and https://github.com/rust-lang/rust/issues/135271
2025-02-25 13:32:54 +01:00
Trevor Gross
af10f27bf1
Rollup merge of #137493 - nabijaczleweli:python3, r=Kobzol
configure.py: don't instruct user to run nonexistent program

```shell-session
$ ./configure
configure: processing command line
configure:
configure: build.configure-args := []
configure: profile              := dist
configure:
configure: writing `config.toml` in current directory
configure:
configure: run `python /mnt/filling/store/nabijaczleweli/code/rust/x.py --help`
```

This is naturally not valid since I don't have a "python" executable (and this will hopefully become more and more true as Python 2 dies out).

./configure knows this since it does `try python3 "$``@"`,`` then `python2.7` &c.

After, this now says
```
configure: run `python3 /mnt/filling/store/nabijaczleweli/code/rust/x.py --help`
```
which is possible, and corresponds to the interpreter actually running.
2025-02-24 18:46:37 -05:00
onur-ozkan
9ad6011494 use stage 2 on cargo and clippy tests when possible
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-24 14:41:50 +00:00
onur-ozkan
cf6dc742b7 add coverage for explicit stage fields
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-24 11:20:13 +03:00
onur-ozkan
37b18f8f47 add explicit stage fields to Config
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-24 11:17:19 +03:00
bors
9af8985e05 Auto merge of #137497 - tgross35:rollup-1oeclrr, r=tgross35
Rollup of 8 pull requests

Successful merges:

 - #136439 (Misc. `rustc_codegen_ssa` cleanups 🧹)
 - #136543 (intrinsics: unify rint, roundeven, nearbyint in a single round_ties_even intrinsic)
 - #136637 (Add binary_format to rustc target specs)
 - #137099 (Fix rustdoc test directives that were accidentally ignored 🧐)
 - #137297 (Update `compiler-builtins` to 0.1.147)
 - #137451 (FIx `sym` -> `syn` typo in tail-expr-drop-order type opt-out)
 - #137452 (bootstrap: add module docs for core:metadata)
 - #137483 (rename sub_ptr to offset_from_unsigned)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-02-23 23:49:11 +00:00
bors
f8a913b138 Auto merge of #137476 - onur-ozkan:137469, r=jieyouxu
avoid `compiler_for` for dist tools and force the current compiler

Using `compiler_for` in dist steps was causing to install stage1 tools into the dist tarballs, which doesn't match with the stage2 compiler.

Fixes https://github.com/rust-lang/rust/issues/137469
2025-02-23 20:32:32 +00:00
Trevor Gross
e8342e7d42
Rollup merge of #137452 - Shourya742:2025-02-23-add-module-level-doc-for-core-metadata, r=Kobzol
bootstrap: add module docs for core:metadata

Add module doc for bootstrap:core:metadata
2025-02-23 14:30:28 -05:00
наб
097d64205a
configure.py: don't instruct user to run nonexistent program
$ ./configure
configure: processing command line
configure:
configure: build.configure-args := []
configure: profile              := dist
configure:
configure: writing `config.toml` in current directory
configure:
configure: run `python /mnt/filling/store/nabijaczleweli/code/rust/x.py --help`

This is naturally not valid since I don't have a "python" executable
(and this will hopefully become more and more true as Python 2 dies out).

./configure knows this since it does try python3 "$@", then python2.7 &c.

After, this now says
  configure: run `python3 /mnt/filling/store/nabijaczleweli/code/rust/x.py --help`
which is possible, and corresponds to the interpreter actually running.
2025-02-23 19:11:37 +01:00
onur-ozkan
1c7b60f8a4 add FIXME note on Builder::compiler_for
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-23 16:05:51 +03:00
onur-ozkan
50f84129e6 avoid compiler_for for dist tools and force the current compiler
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-23 11:55:19 +00:00
bors
b880760977 Auto merge of #137237 - cuviper:stage0, r=Mark-Simulacrum
Master bootstrap update

https://forge.rust-lang.org/release/process.html#master-bootstrap-update-tuesday

r? `@Mark-Simulacrum`
2025-02-23 11:12:56 +00:00
bors
1805b33483 Auto merge of #137466 - jhpratt:rollup-spyi02y, r=jhpratt
Rollup of 9 pull requests

Successful merges:

 - #135354 ([Debuginfo] Add MSVC Synthetic and Summary providers to LLDB)
 - #136826 (Replace mem::zeroed with mem::MaybeUninit::uninit for large struct in Unix)
 - #137194 (More const {} init in thread_local)
 - #137334 (Greatly simplify lifetime captures in edition 2024)
 - #137382 (bootstrap: add doc for vendor build step)
 - #137423 (Improve a bit HIR pretty printer)
 - #137435 (Fix "missing match arm body" suggestion involving `!`)
 - #137448 (Fix bugs due to unhandled `ControlFlow` in compiler)
 - #137458 (Fix missing self subst when rendering `impl Fn*<T>` with no output type)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-02-23 08:06:25 +00:00
Jacob Pratt
553fde4fc9
Rollup merge of #137382 - Shourya742:2025-02-21-add-vendor-step-doc, r=Kobzol
bootstrap: add doc for vendor build step

This PR adds docs for vendor build step.
2025-02-23 02:44:18 -05:00
onur-ozkan
e4ca11f87f downgrade bootstrap cc
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-23 08:24:56 +03:00
bors
bb2cc59a21 Auto merge of #137215 - onur-ozkan:rustc-tool-build-stages, r=jieyouxu,Kobzol
stabilize stage management for rustc tools

https://github.com/rust-lang/rust/pull/135990 got out of control due to excessive complexity. This PR aims to achieve the same goal with a simpler approach, likely through multiple smaller PRs. I will keep the other one read-only and open as a reference for future work.

This work stabilizes the staging logic for `ToolRustc` programs, so you no longer need to handle build and target compilers separately in steps. Previously, most tools didn't do this correctly, which was causing the compiler to be built twice (e.g., `x test cargo --stage 1` would compile the stage 2 compiler before, but now it only compiles the stage 1 compiler).

I also tried to document how we should write `ToolRustc` steps as they are quite different and require more attention than other tools.

Next goal is to stabilize how stages are handled for the rustc itself. Currently, `x build --stage 1` builds the stage 1 compiler which is fine, but `x build compiler --stage 1` builds stage 2 compiler.

~~for now, r? ghost~~
2025-02-23 05:03:26 +00:00
bit-aloo
54dd4c87be
bootstrap: add module docs for core:metadata 2025-02-23 08:37:10 +05:30
bors
15469f8f8a Auto merge of #137420 - matthiaskrgr:rollup-rr0q37f, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #136910 (Implement feature `isolate_most_least_significant_one` for integer types)
 - #137183 (Prune dead regionck code)
 - #137333 (Use `edition = "2024"` in the compiler (redux))
 - #137356 (Ferris 🦀 Identifier naming conventions)
 - #137362 (Add build step log for `run-make-support`)
 - #137377 (Always allow reusing cratenum in CrateLoader::load)
 - #137388 (Fix(lib/fs/tests): Disable rename POSIX semantics FS tests under Windows 7)
 - #137410 (Use StableHasher + Hash64 for dep_tracking_hash)
 - #137413 (jubilee cleared out the review queue)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-02-22 13:32:44 +00:00
Matthias Krüger
b0286b5c21
Rollup merge of #137362 - Kobzol:run-make-support-bootstrap, r=jieyouxu
Add build step log for `run-make-support`

I was always confused about what is being built, since nothing was printed in the log :)

r? ``@jieyouxu``
2025-02-22 11:36:44 +01:00
bors
8dac72bb1d Auto merge of #136428 - EnzymeAD:enable-autodiff, r=oli-obk
test building enzyme in CI

1) This PR fixes a significant compile-time regression, by only running the expensive autodiff pipeline, if the users pass the newly introduced Enable value to the `-Zautodiff=` flag. It updates the test(s) accordingly. It gives a nice error if users forget that.
2) It fixes macos support by explicitly linking against the Enzyme build folder. This doesn't cover CI macos yet.
3) It fixes the issue that setting ENZYME_RUNPASS was ignored by enzyme and in fact did not schedule enzyme's opt pass.
4) It also re-enables support for various other values for the autodiff flag, which were ignored since the refactor.
5) I merged some improvements to Enzyme core, which means we do not longer depend on LLVM being build with the Plugin Interface enabled.
6) Unrelated to other fixes, this changes `rustc_autodiff` to `EncodeCrossCrate::Yes`. It is not enough on it's own to enable usage of Enzyme in libraries, but it is for sure a piece of the fixes needed to get this to work.

try-job: x86_64-gnu

r? `@oli-obk`

Tracking:

- https://github.com/rust-lang/rust/issues/124509
2025-02-22 10:30:06 +00:00
Manuel Drehwald
161a4bf6ff update enzyme submodule and users 2025-02-21 21:49:46 -05:00
Manuel Drehwald
fe90883ef7 fix build regressions 2025-02-21 21:45:29 -05:00
许杰友 Jieyou Xu (Joe)
6d0c27e976 bootstrap: pass --src-root and --src-test-suite-root instead of --src-base 2025-02-22 01:44:28 +08:00
bit-aloo
12a0e2b4dd
bootstrap: add doc for vendor build step 2025-02-21 22:03:38 +05:30
Jakub Beránek
7312747f67 Add build step log for run-make-support
I was always confused about what is being built, since nothing was printed in the log :)
2025-02-21 08:28:42 +01:00
Jubilee
4d479f9c80
Rollup merge of #137340 - Kobzol:bootstrap-dir-check, r=onur-ozkan
Add a notice about missing GCC sources into source tarballs

I didn't use `.gitkeep`, because that would be a hidden file that might not be noticed, whereas we want to let people inspecting the archive know why the sources are missing.

Inspired by https://github.com/rust-lang/rust/issues/137332.

r? `@onur-ozkan`
2025-02-20 14:58:22 -08:00
Jubilee
02ceb5fb52
Rollup merge of #137338 - onur-ozkan:137332, r=Kobzol
skip submodule updating logics on tarballs

Running submodule logic on tarballs isn't necessary since git isn't available there.

Fixes #137332
2025-02-20 14:58:21 -08:00
Jakub Beránek
c0bea5d92d Add a notice about missing GCC sources in source tarballs 2025-02-20 21:06:25 +01:00
onur-ozkan
d2203ad59c skip submodule updating logics on tarballs
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-20 22:49:38 +03:00
Jakub Beránek
953515131b Improve error message when a submodule directory is missing completely 2025-02-20 20:43:57 +01:00
Matthias Krüger
be36bd288f
Rollup merge of #127793 - ChaiTRex:zed_support, r=Kobzol
Added project-specific Zed IDE settings

This repository currently has project-specific VS Code IDE settings in `.vscode` and `compiler/rustc_codegen_cranelift/.vscode`. Now there are equivalent project-specific Zed IDE settings alongside those.

This fixes `rust-analyzer` not being able to properly handle this project.

Note that:

1. The contents of `src/tools/rust-analyzer/.vscode` could not be translated to Zed, as they aren't basic IDE settings.
2. One of the VS Code settings in `.vscode` has no corresponding setting in Zed, and so this has been noted like this:

    ```json
      "_settings_only_in_vs_code_not_yet_in_zed": {
        "git.detectSubmodulesLimit": 20
      },
    ```
2025-02-19 18:52:03 +01:00
onur-ozkan
76063a683f print warning and help messages
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-19 19:26:43 +03:00
onur-ozkan
4b9b5d7896 add change-entry for tools profile update
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-19 19:18:54 +03:00
onur-ozkan
b4a3b6484d set build.test-stage = 2 for tools profile
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-19 19:16:49 +03:00
Matthias Krüger
05dbe6ddff
Rollup merge of #137191 - ehuss:update-mdbook, r=jieyouxu
Update mdbook and move error_index_generator

This moves error_index_generator to the rustbook workspace so that it can share the dependency with mdbook. I had forgotten that error_index_generator is using mdbook.

This includes a corresponding update to mdbook which avoids a regression in error_index_generator.

Closes https://github.com/rust-lang/rust/issues/137052
2025-02-18 18:40:53 +01:00
Josh Stone
fa7a188e85 fix clippy::len-zero 2025-02-18 09:32:44 -08:00
Josh Stone
9b08f0eebb fix clippy::doc-overindented-list-items 2025-02-18 09:32:44 -08:00
Josh Stone
0b7d8ab4c2 fix clippy::double-ended-iterator-last 2025-02-18 09:32:44 -08:00
Josh Stone
587012b85a fix clippy::unneeded-struct-pattern 2025-02-18 09:32:44 -08:00
Josh Stone
5a89237680 update STAGE0_MISSING_TARGETS 2025-02-18 09:32:44 -08:00
Josh Stone
3c45324e67 update cfg(bootstrap) 2025-02-18 09:32:44 -08:00
onur-ozkan
5408aaea59 fix rust-analyzer tests
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18 20:21:50 +03:00
onur-ozkan
26f588bba4 fix cargo tests
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18 16:28:05 +00:00
onur-ozkan
60ade6c1d7 add test coverage for tool::get_tool_rustc_compiler
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18 16:07:42 +00:00
onur-ozkan
baef666f78 adapt tool module to ToolBuildResult
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18 16:00:06 +00:00
onur-ozkan
5e5b1b054a document tool implementations
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18 15:35:51 +00:00
onur-ozkan
6cf650fce7 remove manually handled stage offs
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18 16:32:13 +03:00
onur-ozkan
a33843968c return ToolBuildResult to utilize them from callers
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18 15:35:33 +03:00
onur-ozkan
8e011e5e67 migrate llvm-bitcode-linker to ToolBuild
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-02-18 15:34:55 +03:00