rust-lang / rust-lang/rust-bindgen
bindgen + llvm-19 optimize out some needed const
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.3k
- Forks
- 829
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 15
Description
#define DRM_RS_IOCTL(FOO) \
static const unsigned long DRM_RS_IOCTL_##FOO = DRM_IOCTL_##FOO
DRM_RS_IOCTL(NOUVEAU_EXEC);
becomes nak_bindings.rs.txt
and code fails later with
error[E0425]: cannot find value `DRM_RS_IOCTL_NOUVEAU_EXEC` in this scope
Original bug: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12008
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the DRM_RS_IOCTL macro and the attached nak_bindings.rs.txt output, then reproduce the bindgen + llvm-19 generation described in the issue. Done means DRM_RS_IOCTL_NOUVEAU_EXEC remains available in the generated Rust bindings so the later code compiles; compare findings with the linked Mesa issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100