diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-06-13 05:19:14 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-13 05:19:14 +0200 |
| commit | 3766fb231ad0f0271b3cae53670b92a90b67594b (patch) | |
| tree | dc15579fe02068a27fc184b515919a63ce2f75be /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp | |
| parent | ad90ea89ac60591103aef8b328bd32cc0358fd51 (diff) | |
| parent | 65042d6da3f7261b49d1e9be7eb8e0e1d3bdead1 (diff) | |
| download | rust-3766fb231ad0f0271b3cae53670b92a90b67594b.tar.gz rust-3766fb231ad0f0271b3cae53670b92a90b67594b.zip | |
Rollup merge of #140770 - folkertdev:custom-abi, r=tgross35
add `extern "custom"` functions
tracking issue: rust-lang/rust#140829
previous discussion: https://github.com/rust-lang/rust/issues/140566
In short, an `extern "custom"` function is a function with a custom ABI, that rust does not know about. Therefore, such functions can only be defined with `#[unsafe(naked)]` and `naked_asm!`, or via an `extern "C" { /* ... */ }` block. These functions cannot be called using normal rust syntax: calling them can only be done from inline assembly.
The motivation is low-level scenarios where a custom calling convention is used. Currently, we often pick `extern "C"`, but that is a lie because the function does not actually respect the C calling convention.
At the moment `"custom"` seems to be the name with the most support. That name is not final, but we need to pick something to actually implement this.
r? `@traviscross`
cc `@tgross35`
try-job: x86_64-apple-2
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
