bazel-contrib / bazel-contrib/rules_foreign_cc
Add a `configure` rule that's used to produce `config.h` files
- Dominant language
- Starlark
- Stars
- 737
- Forks
- 270
- PR merge metrics
- No merged PRs in 30d
Description
I have some dependencies that I've migrated away from `rules_foreign_cc` since the configure scripts were escaping the action sandbox and causing cache poisoning. However, I configured the project to basically build with a snap shot of the current state of my platforms. I would like to ensure that as my platforms evolve, that the `config.h` file I'm generating using [write_file](https://github.com/bazelbuild/bazel-skylib/blob/1.4.2/docs/write_file_doc.md) and a bunch of [constraint_value](https://bazel.build/docs/configurable-attributes) select statements are up to date. My plan is to have a test suite that runs a `configure` target after transitioning to each platform that the generated files are accurate.
My question here is, does a `configure` rule sound reasonable?
Contributor guide
Research direction
Start by reviewing the proposed configure target alongside the existing rules_foreign_cc interfaces and the linked write_file and constraint_value documentation. Define the rule’s scope and platform-transition behavior before implementation; done means a test suite can generate config.h for each target platform and verify the generated files are accurate.
Written by the indexing model from the issue text.
Assessment
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100