rules_foreign_cc
rules_foreign_cc copied to clipboard
Add a `configure` rule that's used to produce `config.h` files
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 and a bunch of constraint_value 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?
Yes I think so - rules_hdl has something along these lines: https://github.com/hdl/bazel_rules_hdl/blob/main/dependency_support/pseudo_configure.bzl