rust-lang / rust-lang/rustc_codegen_cranelift

Implement platform specific symbol mangling suppression using \x01

Open
#1,332 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-abi C-enhancement
Dominant language
Rust
Stars
2.1k
Forks
157
Avg merge
1d 19h
Merged PRs (30d)
3

Description

Many platforms have some symbol mangling even for "unmangled" C symbols. For example adding a leading _ or trailing @argcount. LLVM supports suppressing this by prefixing the symbol name with \x01. cg_clif will need to implement this too to support building with -Cpanic=unwind on Windows: https://github.com/rust-lang/rust/blob/2d8651a92761421b0437ffb44ba5670bea5ee1df/library/panic_unwind/src/seh.rs#L213

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading library/panic_unwind/src/seh.rs at the linked symbol references to understand which Windows symbols require suppression. Then trace how cg_clif emits those symbols and verify that prefixing with \x01 allows building with -Cpanic=unwind on Windows.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.