Skip to content

Add --per_file_cxxopt #29700

Description

@carlosgalvezp

Description of the feature request:

Some flags are only valid for C++, and the compiler will throw a hard error if we use them for compiling C code. Thus, we can't add them to --per_file_copt. It would be good if there was an equivalent command line flag --per_file_cxxopt, just like --cxxopt.

Same goes for --host_per_file_cxxopt

Which category does this issue belong to?

Core, Configurability

What underlying problem are you trying to solve with this feature?

Suppress warnings in external code.

Which operating system are you running Bazel on?

Ubuntu 24.04

What is the output of bazel info release?

8.6.0

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?


Have you found anything relevant by searching the web?

No response

Any other information, logs, or outputs that you want to share?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4This is either out of scope or we don't have bandwidth to review a PR. (No assignee)team-Rules-CPPIssues for C++ rulestype: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions