Support NO_PREFIX output_mode for cpp rules

This commit is contained in:
Jeremy Meador 2023-08-09 09:37:52 -07:00
parent 7064b28a75
commit dd753a2881
3 changed files with 4 additions and 4 deletions

View File

@ -36,7 +36,7 @@ def cpp_grpc_library(name, **kwargs): # buildifier: disable=function-docstring
srcs = [name_pb + "_srcs"],
deps = GRPC_DEPS + kwargs.get("deps", []),
hdrs = [name_pb + "_hdrs"],
includes = [name_pb],
includes = [name_pb] if kwargs.get("output_mode", "PREFIXED") == "PREFIXED" else ["."],
alwayslink = kwargs.get("alwayslink"),
copts = kwargs.get("copts"),
defines = kwargs.get("defines"),

View File

@ -36,7 +36,7 @@ def cpp_proto_library(name, **kwargs): # buildifier: disable=function-docstring
srcs = [name_pb + "_srcs"],
deps = PROTO_DEPS + kwargs.get("deps", []),
hdrs = [name_pb + "_hdrs"],
includes = [name_pb],
includes = [name_pb] if kwargs.get("output_mode", "PREFIXED") == "PREFIXED" else ["."],
alwayslink = kwargs.get("alwayslink"),
copts = kwargs.get("copts"),
defines = kwargs.get("defines"),

View File

@ -33,7 +33,7 @@ var cppProtoLibraryRuleTemplate = mustTemplate(cppLibraryRuleTemplateString + `
srcs = [name_pb + "_srcs"],
deps = PROTO_DEPS + kwargs.get("deps", []),
hdrs = [name_pb + "_hdrs"],
includes = [name_pb],
includes = [name_pb] if kwargs.get("output_mode", "PREFIXED") == "PREFIXED" else ["."],
alwayslink = kwargs.get("alwayslink"),
copts = kwargs.get("copts"),
defines = kwargs.get("defines"),
@ -57,7 +57,7 @@ var cppGrpcLibraryRuleTemplate = mustTemplate(cppLibraryRuleTemplateString + `
srcs = [name_pb + "_srcs"],
deps = GRPC_DEPS + kwargs.get("deps", []),
hdrs = [name_pb + "_hdrs"],
includes = [name_pb],
includes = [name_pb] if kwargs.get("output_mode", "PREFIXED") == "PREFIXED" else ["."],
alwayslink = kwargs.get("alwayslink"),
copts = kwargs.get("copts"),
defines = kwargs.get("defines"),