blob: 9f706a7e486ac12c6fe007ce0504eb15cdf265fd [file] [log] [blame] [edit]
"""bazelrc presets for https://github.com/bazel-contrib/bazelrc-preset.bzl"""
PROTOC_TOOLCHAIN_FLAGS = {
"incompatible_enable_proto_toolchain_resolution": struct(
default = True,
description = """\
Bazel 7 introduced this flag to allow us fetch `protoc` rather than re-build it!
That flag ALSO decouples how each built-in language rule (Java, Python, C++, etc.) locates the runtime.
""",
),
"per_file_copt": [
struct(
default = "external/.*protobuf.*@--PROTOBUF_WAS_NOT_SUPPOSED_TO_BE_BUILT",
description = "Make sure protobuf is not built from source",
),
struct(
default = "external/.*grpc.*@--GRPC_WAS_NOT_SUPPOSED_TO_BE_BUILT",
description = "Make sure grpc is not built from source",
),
],
"host_per_file_copt": [
struct(
default = "external/.*protobuf.*@--PROTOBUF_WAS_NOT_SUPPOSED_TO_BE_BUILT",
description = "Make sure protobuf is not built from source",
),
struct(
default = "external/.*grpc.*@--GRPC_WAS_NOT_SUPPOSED_TO_BE_BUILT",
description = "Make sure grpc is not built from source",
),
],
}