Skip to content

Add cxx_standard constraints #406

@UebelAndre

Description

@UebelAndre

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 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions