Revert "Make lto and linker-plugin-lto work the same for compiler_builtins#146133
Revert "Make lto and linker-plugin-lto work the same for compiler_builtins#146133bors merged 1 commit intorust-lang:masterfrom
lto and linker-plugin-lto work the same for compiler_builtins#146133Conversation
|
r? @davidtwco rustbot has assigned @davidtwco. Use |
|
Some changes occurred in compiler/rustc_codegen_ssa |
This comment has been minimized.
This comment has been minimized.
|
r? @bjorn3 |
df97f0f to
0bc9d00
Compare
This comment has been minimized.
This comment has been minimized.
lto and linker-plugin-lto work the same for `compile…lto and linker-plugin-lto work the same for compiler_builtins
|
Can you please remove the issue references from the commit message. r=me with the commit message changed. |
…r_builtins`" This reverts commit cf8753e and fixes the regressions reported.
0bc9d00 to
916b55e
Compare
|
r? @bjorn3 |
|
Requested reviewer is already assigned to this pull request. Please choose another assignee. |
|
@bors r=bjorn3 rollup |
|
@bors p=1 (multiple reported regressions) |
Rollup of 15 pull requests Successful merges: - #143725 (core: add Peekable::next_if_map) - #145209 (Stabilize `path_add_extension`) - #145750 (raw_vec.rs: Remove superfluous fn alloc_guard) - #145962 (Ensure we emit an allocator shim when only some crate types need one) - #145963 (Add LSX accelerated implementation for source file analysis) - #146054 (add `#[must_use]` to `array::repeat`) - #146090 (Derive `PartialEq` for `InvisibleOrigin`) - #146120 (Correct typo in `rustc_errors` comment) - #146127 (Rename `ToolRustc` to `ToolRustcPrivate`) - #146131 (rustdoc-search: add test case for indexing every item type) - #146133 (Revert "Make `lto` and `linker-plugin-lto` work the same for `compiler_builtins`) - #146134 (llvm: nvptx: Layout update to match LLVM) - #146136 (docs(std): add missing closing code block fences in doc comments) - #146137 (Disallow frontmatter in `--cfg` and `--check-cfg` arguments) - #146140 (compiletest: cygwin follows windows in using PATH for dynamic libraries) r? `@ghost` `@rustbot` modify labels: rollup
|
Please also reference the PR when filing a revert, so there's a backlink in the original PR and one can see the revert there. (I did that now for this PR.) |
Revert "Make `lto` and `linker-plugin-lto` work the same for `compiler_builtins` This reverts commit cf8753e (PR rust-lang#145368) and fix the regressions reported at rust-lang#145981 and rust-lang#146109.
Rollup of 16 pull requests Successful merges: - #143725 (core: add Peekable::next_if_map) - #145209 (Stabilize `path_add_extension`) - #145342 (fix drop scope for `super let` bindings within `if let`) - #145750 (raw_vec.rs: Remove superfluous fn alloc_guard) - #145962 (Ensure we emit an allocator shim when only some crate types need one) - #145963 (Add LSX accelerated implementation for source file analysis) - #146054 (add `#[must_use]` to `array::repeat`) - #146090 (Derive `PartialEq` for `InvisibleOrigin`) - #146120 (Correct typo in `rustc_errors` comment) - #146127 (Rename `ToolRustc` to `ToolRustcPrivate`) - #146133 (Revert "Make `lto` and `linker-plugin-lto` work the same for `compiler_builtins`) - #146134 (llvm: nvptx: Layout update to match LLVM) - #146136 (docs(std): add missing closing code block fences in doc comments) - #146137 (Disallow frontmatter in `--cfg` and `--check-cfg` arguments) - #146140 (compiletest: cygwin follows windows in using PATH for dynamic libraries) - #146156 (miri subtree update) r? `@ghost` `@rustbot` modify labels: rollup
|
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing fd75a9c (parent) -> a1208bf (this PR) Test differencesShow 6 test diffsStage 1
Stage 2
Additionally, 3 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard a1208bf765ba783ee4ebdc4c29ab0a0c215806ef --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (a1208bf): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary 10.6%, secondary -1.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 466.494s -> 466.26s (-0.05%) |
Revert "Make `lto` and `linker-plugin-lto` work the same for `compiler_builtins` This reverts commit cf8753e (PR rust-lang#145368) and fix the regressions reported at rust-lang#145981, rust-lang#146109, and rust-lang#146145.
Revert "Make `lto` and `linker-plugin-lto` work the same for `compiler_builtins` This reverts commit cf8753e (PR rust-lang#145368) and fix the regressions reported at rust-lang#145981, rust-lang#146109, and rust-lang#146145.
|
Is there any way to add a test to prevent this regression from occurring again? |
I will add it. |
For cargo: rust-lang/cargo#16277, I will also add a test to rustc later. |
Add a test for rust-lang/rust#146133. `cargo +nightly-2025-08-29 test --test build-std -- lto` can reproduce the regression. This is not a bug from Cargo, but it requires `-Zbuild-std` in most use cases. The test case is from rust-lang/rust#146109. The point is that when rustc is invoked with -Clto=fat or -Clto=thin, it should perform LTO with ALL bitcodes. However, rust-lang/rust#145368 emits bitcodes for compiler_builtins but excludes it from LTO participation. As a result, the compiler_builtins bitcodes library is passed to the linker, but the linkers, such as the GNU ld or older versions of LLD, are unable to process bitcodes.
|
For rustc: #149772. |
…to, r=jieyouxu test: Add a test for 146133 This is a test without using `-Zbuild-std` for rust-lang#146133. There is another test using `-Zbuild-std`: rust-lang/cargo#16277. Even if a crate is marked as `#![no_builtins]`, we can still generate bitcode for rlib, but we cannot emit bitcode to the linker in rustc's LTO.
…to, r=jieyouxu test: Add a test for 146133 This is a test without using `-Zbuild-std` for rust-lang#146133. There is another test using `-Zbuild-std`: rust-lang/cargo#16277. Even if a crate is marked as `#![no_builtins]`, we can still generate bitcode for rlib, but we cannot emit bitcode to the linker in rustc's LTO.
Rollup merge of #149772 - dianqk:no-builtins-linker-plugin-lto, r=jieyouxu test: Add a test for 146133 This is a test without using `-Zbuild-std` for #146133. There is another test using `-Zbuild-std`: rust-lang/cargo#16277. Even if a crate is marked as `#![no_builtins]`, we can still generate bitcode for rlib, but we cannot emit bitcode to the linker in rustc's LTO.
This reverts commit cf8753e (PR #145368) and fix the regressions reported at #145981, #146109, and #146145.