about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2025-08-11Create tracing directory symlink even during dry runJakub Beránek-2/+14
2025-08-11Do not create a span for cached commandsJakub Beránek-3/+3
2025-08-11Always profile commands and generate Chrome profile when tracing is enabledJakub Beránek-56/+37
2025-08-11Correctly show executed command name in Chrome traceJakub Beránek-27/+54
2025-08-11Move tracing setup to the `tracing` moduleJakub Beránek-298/+304
2025-08-11Remove manual `#[instrument]` annotations on stepsJakub Beránek-161/+1
They could easily get out of sync and miss some fields. Now all steps are instrumented automatically.
2025-08-11Remove ad-hoc print of executed/cached steps in verbose modeJakub Beránek-4/+0
When verbose mode is enabled, it is very hard to see the actually executed steps.
2025-08-11Create a span for each executed stepJakub Beránek-28/+108
2025-08-11Replace `tracing_forest` with custom span formattingJakub Beránek-44/+338
2025-08-11Print step timings also when the stap starts to executeJakub Beránek-6/+18
So that it is easier to see which was the last started step when a failure happens on CI.
2025-08-11Use shorter command span labelJakub Beránek-1/+1
2025-08-11Store Chrome step trace into the tracing directoryJakub Beránek-14/+48
2025-08-11Store `latest` symlink to the latest tracing output directoryJakub Beránek-6/+15
2025-08-11Store bootstrap tracing outputs to a unified directoryJakub Beránek-28/+34
2025-08-11Auto merge of #145207 - Kobzol:codegen-backend-clif-dist, r=jieyouxubors-30/+45
Ship correct Cranelift library in its dist component The first commit adds a post-dist UI test to check that Cranelift can be used with the extracted dist x64 Linux archive. The original codegen copy logic in the Cranelift dist step was a bit redundant, and I didn't notice in https://github.com/rust-lang/rust/pull/144787 that it's copying the codegen backend from the build compiler's sysroot, rather than the target compiler's sysroot. The second commit modifies the logic to directly access the built codegen file (there is no need to search for it in the compiler's sysroot, in fact when you run just `x dist rustc_codegen_cranelift`, it shouldn't "taint" the sysroot with the codegen backend! Which it did before https://github.com/rust-lang/rust/pull/144787) and copy it to the tarball under a normalized name. Thus we get around any similar potential issues in the future, and make previously implicit logic more explicit. This also fixes running just `x dist rustc_codegen_cranelift` without enabling `cranelift` in `rust.codegen-backends`, which should have been enabled by https://github.com/rust-lang/rust/pull/144787, but it didn't work fully, because the dist step tried to copy the codegen backend from the compiler's sysroot, but it didn't contain the codegen backend if it was not enabled by `rust.codegen-backends`. Fixes: https://github.com/rust-lang/rust/issues/145201 try-job: dist-x86_64-linux
2025-08-11don't emit rustdoc::broken_intra_doc_links for stuff like [!NOTE]binarycat-2/+14
2025-08-11Document compiler and stdlib in stage1 in `pr-check-2` CI jobJakub Beránek-3/+3
2025-08-11Rollup merge of #145247 - GuillaumeGomez:update-sysinfo, r=KobzolGuillaume Gomez-4/+4
Update `sysinfo` version to `0.37.0` Some small performance improvements and internal cleanups.
2025-08-11Rollup merge of #145221 - Kobzol:cargo-dist-fix-2, r=jieyouxuGuillaume Gomez-0/+2
Fix Cargo cross-compilation (take two) In https://github.com/rust-lang/rust/pull/145083, I fixed the case of manually invoking `x dist cargo`, but I realized that `x install` creates the `tool::Cargo` step through the `from_build_frompiler` constructor, which doesn't go through `get_tool_target_compiler`. So we just prepare both the host and target stdlibs directly before building Cargo. Ideally we would get rid of `from_build_compiler`, but that will require refactoring the dist and test steps, which is upcoming. Hopefully fixes https://github.com/rust-lang/rust/issues/145059 for good.
2025-08-11Update rustc dev guidetiif-1/+6
2025-08-11Turn _span into _trace as trace span nameStypox-12/+12
_span could possibly be confused with the Span type in rustc
2025-08-11Add tracing to resolve-related functionsStypox-0/+2
2025-08-11Update `sysinfo` version to `0.37.0`Guillaume Gomez-4/+4
2025-08-11Auto merge of #145215 - Kobzol:rust-backtrace, r=marcoienibors-0/+3
Enable RUST_BACKTRACE=1 on CI We should really see the backtrace if something in bootstrap fails on CI. https://github.com/rust-lang/rust/pull/145011#issuecomment-3172664934 doesn't show many details.
2025-08-11Auto merge of #145011 - Kobzol:bootstrap-doc, r=jieyouxubors-243/+514
Enforce in bootstrap that doc must have stage at least 1 Following with the bootstrap cleanups, this time around `doc` steps. Should be pretty straightforward, because the supporting infrastructure was already there. The only thing I found a bit fishy is using `Mode::ToolBootstrap` as a "catch-all" mode for non-rustc-private steps in `tool_doc!`, but I don't think that we need to distinguish the tools in some special way when documenting them, apart from supporting `rustc_private`. Before, `x doc` more or less defaulted to what we call stage 2 now. Now it is properly stage 1, so e.g. `x doc compiler` documents the compiler using the stage0/beta rust(do)c. r? `@jieyouxu` try-job: dist-aarch64-msvc
2025-08-11Rollup merge of #145149 - ↵Stuart Cook-306/+439
Shourya742:2025-07-08-convert-config-method-invoke-inside-parse-functions, r=Kobzol Make config method invoke inside parse use dwn_ctx This PR is part of a series of config refactorings. It removes calls from config methods to solid functions defined in `config.rs`. After this, we will remove the default dependencies in the config. r? ```@Kobzol```
2025-08-11Rollup merge of #143949 - clarfonthey:const-arith-ops, r=AmanieuStuart Cook-6/+3
Constify remaining traits/impls for `const_ops` Tracking issue: rust-lang/rust#143802 This is split into two commits for ease of reviewability: 1. Updates the `forward_ref_*` macros to accept multiple attributes (in anticipation of needing `rust_const_unstable` attributes) and also *require* attributes in these macros. Since the default attribute only helps for the initial implementations, it means it's easy to get wrong for future implementations, as shown for the saturating implementations which were incorrect before. 2. Actually constify the traits/impls. A few random other notes on the implementation specifically: * I unindented the attributes that were passed to the `forward_ref_*` macro calls because in some places rustfmt wanted them to be unindented, and in others it was allowed because they were themselves inside of macro bodies. I chose the consistent indenting even though I (personally) think it looks worse. ---- As far as the actual changes go, this constifies the following additional traits: * `Neg` * `Not` * `BitAnd` * `BitOr` * `BitXor` * `Shl` * `Shr` * `AddAssign` * `SubAssign` * `MulAssign` * `DivAssign` * `RemAssign` * `BitAndAssign` * `BitOrAssign` * `BitXorAssign` * `ShlAssign` * `ShrAssign` In terms of constified implementations of these traits, it adds the reference-forwarded versions of all the arithmetic operators, which are defined by the macros in `library/core/src/internal_macros.rs`. I'm not going to fully enumerate these because we'd be here all day, but sufficed to say, it effectively allows adding an `&` to one or both sides of an operator for primitives. Additionally, I constified the implementations for `Wrapping`, `Saturating`, and `NonZero` as well, since all of them forward to already-const-stable methods. (potentially via intrinsics, to avoid extra overhead) There are three "non-primitive" types which implement these traits, listed below. Note that I put "non-primitive" in quotes since I'm including `Wrapping`, `Saturating`, and `NonZero`, which are just wrappers over primitives. * `Duration` (arithmetic operations) * `SystemTime` (arithmetic operations) * `Ipv4Addr` (bit operations) * `Ipv6Addr` (bit operations) Additionally, because the methods on `SystemTime` needed to make these operations const were not marked const, a separate tracking issue for const-stabilising those methods is rust-lang/rust#144517. Stuff left out of this PR: * `Assume` (this could trivially be made const, but since the docs indicate this is still under heavy design, I figured I'd leave it out) * `Instant` (this could be made const, but cannot reasonably be constructed at constant time, so, isn't useful) * `SystemTime` (will submit separate PR) * SIMD types (I'm tackling these all at once later; see rust-lang/portable-simd#467) <!-- TRIAGEBOT_START --> <!-- TRIAGEBOT_CONCERN-ISSUE_START --> > [!NOTE] > # Concerns (0 active) > > - ~~[May break Clippy](https://github.com/rust-lang/rust/pull/143949#issuecomment-3081466077)~~ resolved in [this comment](https://github.com/rust-lang/rust/pull/143949#issuecomment-3083628215) > > *Managed by ```@rustbot`—see`` [help](https://forge.rust-lang.org/triagebot/concern.html) for details.* <!-- TRIAGEBOT_CONCERN-ISSUE_END --> <!-- TRIAGEBOT_END -->
2025-08-10Rollup merge of #145121 - ↵Jacob Pratt-0/+14
lambdageek:dist-must-keep-llvm-third-party-siphash, r=Kobzol bootstrap: `x.py dist rustc-src` should keep LLVM's siphash Fixes rust-lang/rust#145117
2025-08-10Fix Cargo cross-compilation (take two)Jakub Beránek-0/+2
2025-08-10Enable RUST_BACKTRACE=1 on CIJakub Beránek-0/+3
We should really see the backtrace if something in bootstrap fails on CI.
2025-08-10Extract Cranelift componentJakub Beránek-0/+10
2025-08-10Ship the correct Cranelift backend in its dist stepJakub Beránek-30/+35
2025-08-10rustdoc: Use `discr`s `Display` impl to render the value with the correct ↵Eval EXEC-5/+3
signedness
2025-08-10Explicitly pass path to built stdlib JSON docs and use the correct compiler ↵Jakub Beránek-23/+26
for it
2025-08-10Rollup merge of #145156 - Kobzol:cargo-build-dir, r=lqd,jieyouxuStuart Cook-0/+9
Override custom Cargo `build-dir` in bootstrap The context for this issue is in https://github.com/rust-lang/rust/issues/145107. The issue is that if people configure `build-dir`, it would break bootstrap. For now, we just hard-code it to our self-contained target directories inside the build directory. Tested by putting the following: ```toml [build] build-dir = "/tmp/foo" [unstable] build-dir = true ``` into `<rustc-checkout>/.cargo/config.toml`. `x build` works with this PR, doesn't work without this PR. Fixes: https://github.com/rust-lang/rust/issues/145107
2025-08-10Rollup merge of #145135 - Kivooeo:stabilize-duration_constructors_lite, ↵Stuart Cook-12/+0
r=ChrisDenton Stabilize `duration_constructors_lite` feature This closes [tracking issue](https://github.com/rust-lang/rust/issues/140881) and stabilises `Duration::from_hours` and `Duration::from_mins` while not touching a `duration_constructors` feature from the related [tracking issue (2)](https://github.com/rust-lang/rust/issues/120301)
2025-08-10Rollup merge of #145129 - dpaoliello:arm64eclink, r=wesleywiserStuart Cook-0/+7
[win][arm64ec] Add `/machine:arm64ec` when linking LLVM as Arm64EC When the MSVC linker sees an Arm64EC object file, it needs to know if it's linking the final executable as Arm64EC or Arm64X. This change adds the `/machine:arm64ec` flag to the linker when building LLVM as Arm64EC to avoid that ambiguity (and resulting linker error).
2025-08-10Rollup merge of #145089 - Kobzol:bootstrap-cmd-error, r=jieyouxuStuart Cook-82/+83
Improve error output when a command fails in bootstrap I fixed this because it was being an issue for debugging CI failures. We try to print as much information as possible, just with a slightly less verbose command description in non-verbose mode. The code is now more unified and hopefully simpler to understand. I also fixed the `format_short_cmd` logic, it was a bit weird after some recent refactors. Fixes: https://github.com/rust-lang/rust/issues/145002 r? `````````@jieyouxu````````` CC `````````@Shourya742`````````
2025-08-10Rollup merge of #144739 - GuillaumeGomez:rustdoc-test-cleanup, r=fmeaseStuart Cook-3/+1
Use new public libtest `ERROR_EXIT_CODE` constant in rustdoc Followup of rust-lang/rust#144297.
2025-08-10Rollup merge of #144402 - heiher:stabilize-loong32-asm, r=AmanieuStuart Cook-5/+0
Stabilize loongarch32 inline asm r? ````````@Amanieu````````
2025-08-10Rollup merge of #143093 - lqd:polonius-pre-alpha, r=jackh726Stuart Cook-1/+1
Simplify polonius location-sensitive analysis This PR reworks the location-sensitive analysis into what we think is a worthwhile subset of the datalog analysis. A sort of polonius alpha analysis that handles NLL problem case 3 and more, but is still using the faster "reachability as an approximation of liveness", as well as the same loans-in-scope computation as NLLs -- and thus doesn't handle full flow-sensitivity like the datalog implementation. In the last few months, we've identified this subset as being actionable: - we believe we can make a stabilizable version of this analysis - it is an improvement over the status quo - it can also be modeled in a-mir-formality, or some other formalism, for assurances about soundness, and I believe ````````@nikomatsakis```````` is interested in looking into this during H2. - and we've identified the areas of work we wish to explore later to gradually expand the supported cases: the differences between reachability and liveness, support of kills, and considerations of time-traveling, for example. The approach in this PR is to try less to have the graph only represent live paths, by checking whether we reach a live region during traversal and recording the loan as live there, instead of equating traversal with liveness like today because it has subtleties with the typeck edges in statements (that could forward loans to the successor point without ensuring their liveness). We can then also simplify these typeck stmt edges. And we also can simplify traversal by removing looking at kills, because that's enough to handle a bunch of NLL problem 3 cases -- and we can gradually support them more and more in traversal in the future, to reduce the approximation of liveness. There's still some in-progress pieces of work w/r/t opaque types that I'm expecting [lcnr's opaque types rework](https://github.com/rust-lang/rust/pull/139587), and [amanda's SCCs rework](https://github.com/rust-lang/rust/pull/130227) to handle. That didn't seem to show up in tests until I rebased today (and shows lack of test coverage once again) when https://github.com/rust-lang/rust/pull/142255 introduced a couple of test failures with the new captures rules from edition 2024. It's not unexpected since we know more work is needed with member constraints (and we're not even using SCCs in this prototype yet) I'll look into these anyways, both for future work, and checking how these other 2 PRs would change things. --- I'm not sure the following means a lot until we have some formalism in-place, but: - I've changed the polonius compare-mode to use this analysis: the tests pass with it, except 2 cases with minor diagnostics differences, and the 2 edition 2024 opaque types one I mentioned above and need to investigate - things that are expected to work still do work: it bootstraps, can run our rustc-perf benchmarks (and the results are not even that bad), and a crater run didn't find any regressions (forgetting that crater currently fails to test around a quarter of all crates 👼) - I've added tests with improvements, like the NLL problem case 3 and others, as well as some that behave the same as NLLs today and are thus worse than the datalog implementation r? ````````@jackh726```````` (no rush I know you're deep in phd work and "implmentating" the new trait solver for r-a :p <3) This also fixes rust-lang/rust#135646, a diagnostics ICE from the previous implementation.
2025-08-10Rollup merge of #141624 - jyn514:env-var-stubs, r=BoxyUwUStuart Cook-6/+109
unstable-book: Add stubs for environment variables; document some of the important ones This uses a very hacky regex that will probably miss some variables. But having some docs seems better than none at all. In particular, this documents the following env vars explicitly (cc ````````@madsmtm```````` ````````@flba-eb```````` - do the docs for SDKROOT and QNX_TARGET look right?): - COLORTERM - QNX_TARGET - SDKROOT - TERM and generates stubs for the following env vars: - RUST_BACKTRACE - RUSTC_BLESS - RUSTC_BREAK_ON_ICE - RUSTC_CTFE_BACKTRACE - RUSTC_FORCE_RUSTC_VERSION - RUSTC_GRAPHVIZ_FONT - RUSTC_ICE - RUSTC_LOG - RUSTC_RETRY_LINKER_ON_SEGFAULT - RUSTC_TRANSLATION_NO_DEBUG_ASSERT - RUST_DEP_GRAPH_FILTER - RUST_DEP_GRAPH - RUST_FORBID_DEP_GRAPH_EDGE - RUST_MIN_STACK - RUST_TARGET_PATH - UNSTABLE_RUSTDOC_TEST_LINE - UNSTABLE_RUSTDOC_TEST_PATH rendered: ![screenshot of unstable-book running locally, with 14 environment variables shown in the sidebar](https://github.com/user-attachments/assets/8238d094-fb7a-456f-ad43-7c07aa2c44dd)
2025-08-10Bless testsJakub Beránek-3/+20
2025-08-10Review remarksJakub Beránek-2/+6
2025-08-10Add change tracker entryJakub Beránek-0/+5
2025-08-10Update testsJakub Beránek-37/+208
2025-08-10Update `doc` CI steps stage 2Jakub Beránek-3/+3
As they were previously.
2025-08-10Update `Std` doc stepJakub Beránek-27/+40
2025-08-10Fix documentation of toolsJakub Beránek-54/+54
2025-08-10Update `Standalone` and `Releases` doc stepsJakub Beránek-16/+29