Skip to content

Tie extern "llvm-intrinsics" and llvm.* symbol names together - #161922

Open
bjorn3 wants to merge 1 commit into
rust-lang:mainfrom
bjorn3:tie_llvm_intrinsic_abi_and_name
Open

Tie extern "llvm-intrinsics" and llvm.* symbol names together#161922
bjorn3 wants to merge 1 commit into
rust-lang:mainfrom
bjorn3:tie_llvm_intrinsic_abi_and_name

Conversation

@bjorn3

@bjorn3 bjorn3 commented Aug 28, 2026

Copy link
Copy Markdown
Member

LLVM intrinsics must always use extern "llvm-intrinsic" and extern "llvm-intrinsic" must only be used for actual LLVM intrinsics.

Follow up to #161398

@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 28, 2026
@rustbot

rustbot commented Aug 28, 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 21 candidates

@bjorn3

bjorn3 commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

Not sure if this is the best place to do this check.

@rust-log-analyzer

This comment has been minimized.

@ShoyuVanilla

Copy link
Copy Markdown
Member

Sorry, I'm pretty ignorant about this area 😅

r? compiler

Comment thread compiler/rustc_monomorphize/src/mono_checks/abi_check.rs Outdated
@dingxiangfei2009

dingxiangfei2009 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

I reckon that the patch is incomplete. Are you going to "sanitize" the extern "llvm-intrinsics" declarations so that we don't hit the assertions? I can wait a bit.

@bjorn3

bjorn3 commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

Both extern "llvm-intrinsic" and #[link_name = "llvm.*"] are unstable features marked as internal. As such I think it is fine to ICE whenever you abuse them per rust-lang/compiler-team#620. But if you really want I can change them to fatal errors.

@bjorn3
bjorn3 force-pushed the tie_llvm_intrinsic_abi_and_name branch from 6abfc6e to bef2612 Compare September 9, 2026 11:56
@rustbot rustbot added the A-run-make Area: port run-make Makefiles to rmake.rs label Sep 9, 2026
@rustbot

This comment has been minimized.

@bjorn3
bjorn3 force-pushed the tie_llvm_intrinsic_abi_and_name branch 2 times, most recently from a42ef04 to f1c5f4f Compare September 9, 2026 12:06
@rust-bors

This comment has been minimized.

LLVM intrinsics must always use extern "llvm-intrinsic" and
extern "llvm-intrinsic" must only be used for actual LLVM intrinsics.
@bjorn3
bjorn3 force-pushed the tie_llvm_intrinsic_abi_and_name branch from f1c5f4f to 2e6314d Compare September 10, 2026 16:05
@rustbot

rustbot commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

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.

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

Labels

A-run-make Area: port run-make Makefiles to rmake.rs 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants