bazelbuild / bazelbuild/rules_cc
Add `cxx_standard` constraints
- Dominant language
- Starlark
- Stars
- 247
- Forks
- 196
- PR merge metrics
- No merged PRs in 30d
Description
I have wanted to configure targets in such a way that I can pass `-stdc++17` as a default value but remove this flag if a consumer wants to use a different version. Using [--copt](https://bazel.build/reference/command-line-reference#flag--cxxopt) is insufficient as it leads to targets being un-buildable unless consumers specify this on the command line or in their `.bazelrc` files which can be confusing or not feasible.
Would it be reasonable to define some `cxx_standard` constraints somewhere within `rules_cc` that's backed by a string flag such that users can specify on the command line or via a transition what version to use but would otherwise allow maintainers to set meaningful defaults that don't hinder folks who want to use different versions?
Contributor guide
Assessment
This issue has not been assessed yet.