Skip to content

Commit

Permalink
Merge pull request #298 from yeswalrus/patch-1
Browse files Browse the repository at this point in the history
Only forward nocopts to cc_library if present in kwargs
  • Loading branch information
aaliddell committed Dec 14, 2023
2 parents aa1786d + fcc828b commit e7349ce
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions cpp/cpp_proto_library.bzl
Expand Up @@ -37,19 +37,20 @@ def cpp_proto_library(name, **kwargs): # buildifier: disable=function-docstring
deps = PROTO_DEPS + kwargs.get("deps", []),
hdrs = [name_pb + "_hdrs"],
includes = [name_pb] if kwargs.get("output_mode", "PREFIXED") == "PREFIXED" else ["."],
alwayslink = kwargs.get("alwayslink"),
copts = kwargs.get("copts"),
defines = kwargs.get("defines"),
include_prefix = kwargs.get("include_prefix"),
linkopts = kwargs.get("linkopts"),
linkstatic = kwargs.get("linkstatic"),
local_defines = kwargs.get("local_defines"),
nocopts = kwargs.get("nocopts"),
strip_include_prefix = kwargs.get("strip_include_prefix"),
**{
k: v
for (k, v) in kwargs.items()
if k in bazel_build_rule_common_attrs
if k in bazel_build_rule_common_attrs + [
"alwayslink",
"copts",
"defines",
"include_prefix",
"linkopts",
"linkstatic",
"local_defines",
"nocopts",
"strip_include_prefix",
]
} # Forward Bazel common args
)

Expand Down

0 comments on commit e7349ce

Please sign in to comment.