mirror of
https://github.com/protocolbuffers/protobuf
synced 2026-08-26 02:23:14 -04:00
Upstreamed from my https://github.com/aspect-build/toolchains_protoc which provided this feature outside the protobuf repo.
Adds:
- private API: module_extension + tag `protoc.prebuilt_toolchain` to provide and register toolchain for bzlmod users
- WORKSPACE users can live with the inconvenience of having to create toolchains themselves
- example of proto_library rule with intentionally non-functional cc toolchain, exercising the feature
This needs work with @thesayyn to:
- constrain users to choosing a protoc version agreeing with design doc
https://docs.google.com/document/d/16N-eU-0zHbWmxEuaUAIFTJwQLekIXZ8zIC3K4XDr20E/edit
- also register lang toolchains when the flag is enabled
Work towards #19558
Closes #24115
COPYBARA_INTEGRATE_REVIEW=https://github.com/protocolbuffers/protobuf/pull/24115 from protocolbuffers:alexeagle/use_prebuilt_toolchain b18667d82c
PiperOrigin-RevId: 844859103
13 lines
296 B
Text
13 lines
296 B
Text
"""Bazel module dependencies"""
|
|
|
|
module(
|
|
name = "com_google_protobuf-example-without-cc-toolchain",
|
|
version = "0.0.0",
|
|
compatibility_level = 1,
|
|
)
|
|
|
|
bazel_dep(name = "protobuf", repo_name = "com_google_protobuf")
|
|
local_path_override(
|
|
module_name = "protobuf",
|
|
path = "../..",
|
|
)
|