Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ghorn opened this issue Oct 14, 2023 · 0 comments
Open

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

ghorn opened this issue Oct 14, 2023 · 0 comments
Labels
enhancement New feature or request untriaged Requires traige

Comments

@ghorn
Copy link

ghorn commented Oct 14, 2023

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).

@ghorn ghorn added the enhancement New feature or request label Oct 14, 2023
@github-actions github-actions bot added the untriaged Requires traige label Oct 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request untriaged Requires traige
Projects
None yet
Development

No branches or pull requests

1 participant