Skip to content

[bazel] Introduce config setting to enable clang proto fuzzer targets #123833

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

slackito
Copy link
Collaborator

This change puts behind a bazel custom flag
(--@llvm-project//clang:enable_proto_fuzzer) the targets that would be enabled by the CLANG_ENABLE_PROTO_FUZZER cmake variable. This bazel flag can be specified in the command line, or added to the user's bazelrc file.

This change puts behind a bazel custom flag
(`--@llvm-project//clang:enable_proto_fuzzer`) the targets that would be
enabled by the CLANG_ENABLE_PROTO_FUZZER cmake variable. This bazel flag
can be specified in the command line, or added to the user's bazelrc
file.
@llvmbot llvmbot added the bazel "Peripheral" support tier build system: utils/bazel label Jan 21, 2025
@slackito slackito requested a review from chapuni January 21, 2025 22:12
@rupprecht
Copy link
Collaborator

Mechanically this gets the job done, but I'd like to understand more about why we need to do this. This adds complexity that I'd rather avoid unless it's necessary.

From #123126, the request is to be able to not build these targets. But why? For example, if someone is building //clang:all and they don't want this target, the solution should be to list the specific clang tools to build.

@chapuni, can you clarify why you need these targets excluded? What does your build invocation look like?

@chapuni
Copy link
Contributor

chapuni commented Jan 27, 2025

@rupprecht I'd like to use //clang:all for my private builder not to miss newly added targets.
That said, protobuf stuff is not in my scope. I don't want to append rules in my WORKSPACE for that.

For me, it'd be better if I could specify like -//clang/clang-fuzzer/....

protobuf doesn't prevent my build when I build "clang toolchains" with the explicit target. So, easy exclusions would not be necessary if you don't want to involve complexity at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bazel "Peripheral" support tier build system: utils/bazel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants