bazel-contrib / bazel-contrib/rules_foreign_cc
user-provided make variables should override resolved toolchain ones
- Dominant language
- Starlark
- Stars
- 737
- Forks
- 270
- PR merge metrics
- No merged PRs in 30d
Description
When we pass environment variables for flags (e.g. `ARFLAGS`), I noticed that it appends to the resolved toolchain values. This is not always desired, and I expected it to be set to the value I gave it.
Like outside Bazel, if we want to inherit an environment flag, I'd expect the same to be true here. E.g. `ARFLAGS="${ARFLAGS:-} foobar"`. Or the classic `export PATH="${PATH}:/some/dir"`.
I'm posting here to start a discussion of what would be the best way to fix this without breaking the world. Or am I overlooking something obvious?
Contributor guide
Research direction
The issue names no files, tests, or entry points. Start by locating how environment flag variables such as ARFLAGS are combined with resolved toolchain values, then determine the compatibility requirements; done means user-provided values override those defaults while explicit inheritance patterns remain possible.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100