Skip to content

Make the LLVM version mismatch ICE a fatal error - #162034

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
saethlin:llvm-version-mismatch-error
Aug 31, 2026
Merged

Make the LLVM version mismatch ICE a fatal error#162034
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
saethlin:llvm-version-mismatch-error

Conversation

@saethlin

@saethlin saethlin commented Aug 31, 2026

Copy link
Copy Markdown
Member

It was pointed out to me that the diatnostic in #161788 has the usual ICE messages about how this is a bug and we'd appreciate a report. But it isn't, and a fatal error is a better way to report the problem. Manually tested on MacOS:

$ export DYLD_LIBRARY_PATH=/opt/homebrew/opt/llvm@21/lib
$ rustc +stage1 --print=sysroot
error: LLVM version mismatch: this compiler was built for LLVM 23, but LLVM 21.1.8 was found at /opt/homebrew/Cellar/llvm@21/21.1.8/lib/libLLVM.dylib

$ unset DYLD_LIBRARY_PATH
$ rustc +stage1 --print=sysroot
/Users/ben.kimock/rust/build/aarch64-apple-darwin/stage1

@rustbot

rustbot commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

rustc_macros::diagnostics was changed

cc @TaKO8Ki, @JonathanBrouwer

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic labels Aug 31, 2026
@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 Aug 31, 2026
@rustbot

rustbot commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

r? @ShoyuVanilla

rustbot has assigned @ShoyuVanilla.
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: compiler
  • compiler expanded to 75 candidates
  • Random selection from 19 candidates

@nnethercote

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@rust-bors

rust-bors Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 1d73758 has been approved by nnethercote

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 Aug 31, 2026
rust-bors Bot pushed a commit that referenced this pull request Aug 31, 2026
Rollup of 8 pull requests

Successful merges:

 - #161301 (libcore: expose volatile atomic operations)
 - #161379 (Use better generic type parameter names for `Extend` and `FromIterator`)
 - #161926 (borrowck: Restore alias rigidity from HIR typeck)
 - #161956 (Remove unused `perform_locally_with_next_solver`)
 - #162026 (Emit delayed bug instead of ICEing when `TypeOutlives` goal fails)
 - #162034 (Make the LLVM version mismatch ICE a fatal error)
 - #162037 (LLVM wrapper cleanups)
 - #162043 (_ an unused parameter)
@rust-bors
rust-bors Bot merged commit 51f306c into rust-lang:main Aug 31, 2026
13 checks passed
@rustbot rustbot added this to the 1.100.0 milestone Aug 31, 2026
rust-bors Bot pushed a commit that referenced this pull request Aug 31, 2026
Rollup merge of #162034 - saethlin:llvm-version-mismatch-error, r=nnethercote

Make the LLVM version mismatch ICE a fatal error

It was pointed out to me that the diatnostic in #161788 has the usual ICE messages about how this is a bug and we'd appreciate a report. But it isn't, and a fatal error is a better way to report the problem. Manually tested on MacOS:
```
$ export DYLD_LIBRARY_PATH=/opt/homebrew/opt/llvm@21/lib
$ rustc +stage1 --print=sysroot
error: LLVM version mismatch: this compiler was built for LLVM 23, but LLVM 21.1.8 was found at /opt/homebrew/Cellar/llvm@21/21.1.8/lib/libLLVM.dylib

$ unset DYLD_LIBRARY_PATH
$ rustc +stage1 --print=sysroot
/Users/ben.kimock/rust/build/aarch64-apple-darwin/stage1
```
@rust-timer

Copy link
Copy Markdown
Collaborator

Note

This PR was benchmarked as part of triage of its containing rollup: triage URL.

Finished benchmarking commit (fdeb69b): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This perf run didn't have relevant results for this metric.

Max RSS (memory usage)

Results (primary -1.0%, secondary -1.2%)

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
Improvements ✅
(primary)
-1.0% [-1.0%, -1.0%] 1
Improvements ✅
(secondary)
-1.2% [-1.5%, -0.9%] 4
All ❌✅ (primary) -1.0% [-1.0%, -1.0%] 1

Cycles

This perf run didn't have relevant results for this metric.

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: missing data
Artifact size: 307.41 MiB -> 402.64 MiB (30.98%)

@jieyouxu jieyouxu added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Sep 2, 2026
@jieyouxu jieyouxu assigned nnethercote and unassigned ShoyuVanilla Sep 2, 2026
@rustbot

rustbot commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

beta backport approved as per compiler team on Zulip. A backport PR will be authored by the release team at the end of the current development cycle. Backport labels are handled by them.

@rustbot rustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Sep 3, 2026
@cuviper cuviper mentioned this pull request Sep 3, 2026
@cuviper cuviper modified the milestones: 1.100.0, 1.99.0 Sep 3, 2026
@cuviper cuviper removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Sep 3, 2026
rust-bors Bot pushed a commit that referenced this pull request Sep 3, 2026
[beta] backports

- Avoid arming the Windows TLS destructor guard in fibers #161451
- (partial) stdarch subtree update #161558
- Check to ensure we're running against the correct LLVM version #161788
- Make the LLVM version mismatch ICE a fatal error #162034
- Revert "Add `rustc_test_entrypoint_marker`" #161931
- Fix ICE of getting name from RPITIT #162071
- Update LLVM submodule #162133
- Revert "Implement Debug for C-like enums with a concatenated string" #162164

r? me
rust-bors Bot pushed a commit that referenced this pull request Sep 4, 2026
[beta] backports

- Avoid arming the Windows TLS destructor guard in fibers #161451
- (partial) stdarch subtree update #161558
- Check to ensure we're running against the correct LLVM version #161788
- Make the LLVM version mismatch ICE a fatal error #162034
- Revert "Add `rustc_test_entrypoint_marker`" #161931
- Fix ICE of getting name from RPITIT #162071
- Update LLVM submodule #162133
- Revert "Implement Debug for C-like enums with a concatenated string" #162164

r? me
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. A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic beta-accepted Accepted for backporting to the compiler in the beta channel. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

7 participants