Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
load("@rules_cc//cc:defs.bzl", "cc_library")

licenses(["notice"]) # Apache 2

cc_library(
name = "protobuf-mutator",
srcs = glob(
[
"src/**/*.cc",
],
exclude = ["**/*_test.cc"],
),
hdrs = glob(["src/**/*.h"]) + ["port/protobuf.h"],
include_prefix = "libprotobuf_mutator",
includes = [
"port",
"src",
],
visibility = ["//visibility:public"],
deps = ["@com_google_protobuf//:protobuf"],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can make the dependency set a bit smaller: Building with the following dependency set appears to be sufficient and results in less code being built than when using the full protobuf target.

deps = [
    "@com_google_protobuf//:any_cc_proto",
    "@com_google_protobuf//:differencer",
    "@com_google_protobuf//:protobuf_lite",
],```

)

alias(
name = "libprotobuf-mutator",
actual = ":protobuf-mutator",
visibility = ["//visibility:public"],
)
1 change: 1 addition & 0 deletions MODULES.bazel → MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ bazel_dep(
version = "26.0.bcr.1",
repo_name = "com_google_protobuf",
)
bazel_dep(name = "rules_cc", version = "0.1.5")