rules_cc icon indicating copy to clipboard operation
rules_cc copied to clipboard

Feature flags for common compiler options (e.g. C++ standard)

Open paulherman opened this issue 3 years ago • 0 comments

Description of the problem / feature request:

Allow customizing common flags (e.g. standard version) via features.

Feature requests: what underlying problem are you trying to solve with this feature?

I want to not add compiler dependent flags to .bazelrc nor to my rules. Instead, I believe some of the common options (e.g. --std=c++17) could be best modelled by features. Moreover, this would add clear documentation w.r.t. what's the default standard on each toolchain as opposed to being hardcoded (https://github.com/bazelbuild/rules_cc/search?q=%22-std%3Dc%2B%2B%22).

Have you found anything relevant by searching the web?

  • https://stackoverflow.com/questions/40260242/how-to-set-c-standard-version-when-build-with-bazel

paulherman avatar Aug 08 '22 12:08 paulherman