Skip to content

Add rlib digest to identify Rust object files#154861

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
mehdiakiki:fix/rlib-digest
May 5, 2026
Merged

Add rlib digest to identify Rust object files#154861
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
mehdiakiki:fix/rlib-digest

Conversation

@mehdiakiki
Copy link
Copy Markdown
Contributor

@mehdiakiki mehdiakiki commented Apr 6, 2026

View all comments

This adds a metadata entry to rlib archives that lists which members are Rust object files instead of relying on the filename heuristic in looks_like_rust_object.file. I also added a fallback to the old behavior for rlibs built by older compilers.

Part of #138243.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 6, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 6, 2026

r? @mati865

rustbot has assigned @mati865.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: codegen, compiler
  • codegen, compiler expanded to 69 candidates
  • Random selection from 11 candidates

@rustbot

This comment has been minimized.

@rustbot

This comment has been minimized.

@mati865
Copy link
Copy Markdown
Member

mati865 commented Apr 6, 2026

Got too much on my plate already.

@rustbot reroll

@rustbot rustbot assigned chenyukang and unassigned mati865 Apr 6, 2026
Comment thread compiler/rustc_codegen_ssa/src/back/link.rs Outdated
Comment thread compiler/rustc_codegen_ssa/src/back/rlib_digest.rs Outdated
Comment thread compiler/rustc_codegen_ssa/src/back/link.rs Outdated
Comment thread compiler/rustc_codegen_ssa/src/back/rlib_digest.rs Outdated
@petrochenkov petrochenkov self-assigned this Apr 6, 2026
Comment thread compiler/rustc_codegen_ssa/src/back/link.rs Outdated
Comment thread compiler/rustc_codegen_ssa/src/back/link.rs Outdated
Comment thread compiler/rustc_codegen_ssa/src/back/rlib_digest.rs Outdated
@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 7, 2026
@mehdiakiki
Copy link
Copy Markdown
Contributor Author

Will address the review comments by tomorrow!

@rust-log-analyzer

This comment has been minimized.

Comment thread compiler/rustc_codegen_ssa/src/back/link.rs Outdated
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 14, 2026

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

@rustbot rustbot added the A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. label Apr 14, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 14, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@rustbot

This comment has been minimized.

@rustbot rustbot added the has-merge-commits PR has merge commits, merge with caution. label Apr 14, 2026
@rust-log-analyzer

This comment has been minimized.

@mehdiakiki
Copy link
Copy Markdown
Contributor Author

Ok will complete the name changes today.

@mehdiakiki
Copy link
Copy Markdown
Contributor Author

@rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels May 5, 2026
@petrochenkov
Copy link
Copy Markdown
Contributor

@bors r+

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 5, 2026

📌 Commit 9606b0b has been approved by petrochenkov

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 5, 2026
jhpratt added a commit to jhpratt/rust that referenced this pull request May 5, 2026
…ochenkov

Add rlib digest to identify Rust object files

This adds a metadata entry to `rlib` archives that lists which members are Rust object files instead of relying on the filename heuristic in `looks_like_rust_object.file`. I also added a fallback to the old behavior for `rlibs` built by older compilers.

Part of rust-lang#138243.
rust-bors Bot pushed a commit that referenced this pull request May 5, 2026
Rollup of 3 pull requests

Successful merges:

 - #154861 (Add rlib digest to identify Rust object files)
 - #155341 (generic_const_args: allow paths to non type consts)
 - #156014 (resolve: Catch "cannot reexport" errors from macros 2.0 better)
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request May 5, 2026
Add rlib digest to identify Rust object files



This adds a metadata entry to `rlib` archives that lists which members are Rust object files instead of relying on the filename heuristic in `looks_like_rust_object.file`. I also added a fallback to the old behavior for `rlibs` built by older compilers. 

Part of #138243.
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

The job x86_64-gnu-llvm-21-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test expr_store::tests::body::async_fn_weird_param_patterns ... ok
test expr_store::scope::tests::while_let_adds_binding ... ok
test expr_store::tests::body::array_element_cfg ... ok
test expr_store::tests::body::block::inner_item_smoke ... ok
error: test failed, to rerun pass `-p hir-def --lib`

Caused by:
  process didn't exit successfully: `/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools/x86_64-unknown-linux-gnu/release/deps/hir_def-c439368f2b64a049 '--skip=tests::smoke_test_real_sysroot_cargo' --skip=check_code_formatting -Z unstable-options --format json` (signal: 11, SIGSEGV: invalid memory reference)
Bootstrap failed while executing `--stage 2 test --skip tests --skip coverage-map --skip coverage-run --skip library --skip tidyselftest`
Build completed unsuccessfully in 1:01:16
  local time: Tue May  5 12:54:17 UTC 2026
  network time: Tue, 05 May 2026 12:54:18 GMT
##[error]Process completed with exit code 1.

@rust-bors rust-bors Bot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 5, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 5, 2026

💔 Test for ee26d47 failed: CI. Failed job:

@JonathanBrouwer
Copy link
Copy Markdown
Contributor

@bors retry

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 5, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 5, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 5, 2026

☀️ Test successful - CI
Approved by: petrochenkov
Duration: 3h 8m 44s
Pushing 740679e to main...

@rust-bors rust-bors Bot merged commit 740679e into rust-lang:main May 5, 2026
12 checks passed
@rustbot rustbot added this to the 1.97.0 milestone May 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

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 4feb722 (parent) -> 740679e (this PR)

Test differences

Show 2 test diffs

2 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 740679e1f5554a3c1695317e084809e3fceb9825 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. test-various: 1h 29m -> 1h 56m (+31.4%)
  2. dist-x86_64-msvc-alt: 2h 8m -> 2h 42m (+25.9%)
  3. x86_64-msvc-2: 2h 33m -> 2h (-21.6%)
  4. x86_64-gnu-debug: 1h 55m -> 1h 30m (-21.4%)
  5. dist-powerpc64le-linux-gnu: 1h 34m -> 1h 16m (-19.5%)
  6. dist-armhf-linux: 1h 28m -> 1h 11m (-18.8%)
  7. dist-loongarch64-musl: 1h 47m -> 1h 28m (-17.9%)
  8. dist-x86_64-musl: 2h 11m -> 1h 48m (-17.5%)
  9. dist-i686-msvc: 2h 22m -> 1h 59m (-16.3%)
  10. dist-x86_64-netbsd: 1h 22m -> 1h 10m (-14.9%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (740679e): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.4% [0.3%, 0.6%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -2.2%, secondary 0.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.8% [0.6%, 0.9%] 2
Improvements ✅
(primary)
-2.2% [-2.2%, -2.2%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.2% [-2.2%, -2.2%] 1

Cycles

Results (primary 0.1%, secondary 0.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.3% [2.3%, 2.3%] 1
Regressions ❌
(secondary)
1.2% [0.5%, 2.5%] 6
Improvements ✅
(primary)
-2.1% [-2.1%, -2.1%] 1
Improvements ✅
(secondary)
-0.5% [-0.6%, -0.4%] 2
All ❌✅ (primary) 0.1% [-2.1%, 2.3%] 2

Binary size

Results (primary 0.1%, secondary 0.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.1% [0.0%, 0.2%] 65
Regressions ❌
(secondary)
0.7% [0.0%, 4.1%] 84
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.1% [0.0%, 0.2%] 65

Bootstrap: 495.518s -> 495.494s (-0.00%)
Artifact size: 394.42 MiB -> 394.42 MiB (0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. merged-by-bors This PR was explicitly merged by bors. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants