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
```
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 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.

4 participants