rust-lang / rust-lang/rust-bindgen

Make `BINDGEN_EXTRA_CLANG_ARGS` work with `BINDGEN_EXTRA_CLANG_ARGS_<target>`

Open
#2,701 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
5.3k
Forks
829
Avg merge
1d 1h
Merged PRs (30d)
15

Description

Suppose a user has the env var BINDGEN_EXTRA_CLANG_ARGS_<target> set. They now want to add -v to clang, so they'll set BINDGEN_EXTRA_CLANG_ARGS=-v, thinking it'll work, but it wont.

I wonder if it would be possible to make BINDGEN_EXTRA_CLANG_ARGS work in tandem with BINDGEN_EXTRA_CLANG_ARGS_<target>, simply appending BINDGEN_EXTRA_CLANG_ARGS to the end.

Contributor guide

Open the contributing guide

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 locating the code that reads BINDGEN_EXTRA_CLANG_ARGS and BINDGEN_EXTRA_CLANG_ARGS_, then check how the two values are currently handled. Done means the generic arguments are appended when a target-specific variable is set, with coverage for the combined behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.