rust-lang / rust-lang/rust-bindgen
Consider removing the search path fixup in bindgen
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.3k
- Forks
- 829
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 15
Description
As I mentioned in #330 (comment), I think we should remove the search path fixup.
The reasons are:
- There are many arguments which can affect search path selection. In addition to
--target(which the fixup detects and disables itself with),-stdlib,-mmacos-version-min, etc. can also affect search path selection. It means if someone forgets to disable the fixup via--targetwhen they use those arguments, they may have multiple search path set for stdlib, which can lead to unpredictable issues. - This fixup effectively hides real issues that people need to specify arguments for having the correct search path.
I don't see any evidence indicating that libclang cannot do the same search path selection as command line clang. @emilio pointed out that #242 is an issue because of lack of this fixup, but I don't think it's convincing since the reporter doesn't provide the arguments they use, so it is unclear what really should happen.
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 by locating the search path fixup referenced in this issue and read the discussion in #330. Review #242 and compare the behavior with the command-line clang search-path arguments mentioned here; done means the fixup is removed without masking required arguments and relevant behavior is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100