rust-lang / rust-lang/rust-bindgen
BINDGEN_EXTRA_CLANG_ARGS_<TARGET> does not document how can be formatted the TARGET
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.3k
- Forks
- 829
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 15
Description
Hello :)
At the moment, Bindgen does not document in its readme that in BINDGEN_EXTRA_CLANG_ARGS_ is either the target value or the target with hyphens replaced by underscores.
This is confusing because without any indication, we are tempted to think that bindgen works like cargo config (see https://doc.rust-lang.org/cargo/reference/config.html#environment-variables) but that's not the case.
For instance, the following does not work (while it would for cargo):
$ BINDGEN_EXTRA_CLANG_ARGS_X86_64_UNKNOWN_LINUX_GNU=-v bindgen ...
What bindgen supports is:
$ BINDGEN_EXTRA_CLANG_ARGS_x86_64_unknown_linux_gnu=-v bindgen ...
It would be nice if you could document the format in the README :-)
Maybe it would also be cool to support uppercase targets by modifying get_target_dependent_env_var().
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 in the README section documenting BINDGEN_EXTRA_CLANG_ARGS_ and compare it with get_target_dependent_env_var(). Document that may use the target value or a target with hyphens replaced by underscores, using the examples in the issue. Done when the README makes the supported formatting clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100