Skip to content

[FR]: can copts come after extra_cxxflags? #154

@ghorn

Description

@ghorn

What is the current behavior?

We are adding a large set of warning flags with extra_cxxflags and extra_cflags. I just tried to disable a warning locally in a cc_library with with copts = ["-Wno-foo"], and it surprisingly didn't work. I built with bazel build -s and saw that the compiler invocation adds the extra_cxxflags after the flags from copts. This means that one cannot disable any flag from extra_cxxflags locally in a cc_library.

Was it intentional to do it this way or was that just how it was set up?

Describe the feature

If it makes sense, then the feature would be to swap the order of extra_cxxflags and copts. (Same for extra_cflags).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions