[llvm] [bazel] Add rules for clang-fuzzer protobuf-related libraries (PR #123126)

Jorge Gorbe Moya via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 17 11:29:21 PST 2025


slackito wrote:

> Could we split out clang-proto-fuzzer stuff into the directory (for me to exclude them easily)?

I'm not opposed to this, but if these targets are causing you problems I'd like to know more details. I tested this on a machine without `protoc` installed so I assumed it'd be okay.

Does it need to be a separate directory or would something like a `config_setting` with a custom flag work for you? I think that would be similar in spirit to the `CLANG_ENABLE_PROTO_FUZZER` cmake flag. Then we could have a setting with a custom `-- at llvm-project//clang:enable_proto_fuzzer` (or something like this, I'm not super familiar with this part of bazel yet) flag, that people could add to their blazerc.

> 
> For now, I have:
> 
> ```
>     "- at llvm-project//clang:clang-fuzzer-initialize",
>     "- at llvm-project//clang:clang-proto-to-cxx",
>     "- at llvm-project//clang:cxx_cc_proto",
>     "- at llvm-project//clang:cxx-proto",
>     "- at llvm-project//clang:proto-to-cxx-lib",
> ```

Do you mean only the proto-related stuff, or everything clang-fuzzer? If it's the former, we don't need to exclude `clang-fuzzer-initialize` because it doesn't depend on protobufs. And if it's the latter, we'd also need to exclude/move some other recently-added targets like `clang-fuzzer-dictionary` and `handle-cxx`.


https://github.com/llvm/llvm-project/pull/123126


More information about the llvm-commits mailing list