Skip to content

Commit

Permalink
Remove cc_proto_library from defs.bzl
Browse files Browse the repository at this point in the history
This makes it possible to remove dependency on protobuf. The dependency causes more problems than compatibility with some users of cc_proto_library from rules_cc.

Move WORKSPACE.bzlmod into correct directory.

PiperOrigin-RevId: 691445019
Change-Id: I45d7b4e381483de14ea2d20110be40f471a1ad12
  • Loading branch information
comius authored and copybara-github committed Oct 30, 2024
1 parent 597be67 commit b15fed2
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 11 deletions.
1 change: 0 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ module(
bazel_dep(name = "bazel_features", version = "1.19.0")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "protobuf", version = "27.0")

cc_configure = use_extension("//cc:extensions.bzl", "cc_configure_extension")
use_repo(cc_configure, "local_config_cc", "local_config_cc_toolchains")
Expand Down
7 changes: 0 additions & 7 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,3 @@ http_archive(
strip_prefix = "rules_testing-0.6.0",
url = "https://github.com/bazelbuild/rules_testing/releases/download/v0.6.0/rules_testing-v0.6.0.tar.gz",
)

http_archive(
name = "protobuf",
sha256 = "da288bf1daa6c04d03a9051781caa52aceb9163586bff9aa6cfb12f69b9395aa",
strip_prefix = "protobuf-27.0",
url = "https://github.com/protocolbuffers/protobuf/releases/download/v27.0/protobuf-27.0.tar.gz",
)
File renamed without changes.
3 changes: 0 additions & 3 deletions cc/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.
"""Starlark rules for building C++ projects."""

load("@protobuf//bazel:cc_proto_library.bzl", _cc_proto_library = "cc_proto_library")
load("//cc:cc_binary.bzl", _cc_binary = "cc_binary")
load("//cc:cc_import.bzl", _cc_import = "cc_import")
load("//cc:cc_library.bzl", _cc_library = "cc_library")
Expand Down Expand Up @@ -43,8 +42,6 @@ cc_shared_library = _cc_shared_library
objc_library = _objc_library
objc_import = _objc_import

cc_proto_library = _cc_proto_library # For compatibility with current users

# Toolchain rules

cc_toolchain = _cc_toolchain
Expand Down
1 change: 1 addition & 0 deletions cc/private/toolchain/unix_cc_configure.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,7 @@ def configure_unix_toolchain(repository_ctx, cpu_value, overridden_tools):
repository_ctx.template(
"BUILD",
paths["@rules_cc//cc/private/toolchain:BUILD.tpl"],
# @unsorted-dict-items
{
"%{abi_libc_version}": escape_string(get_env_var(
repository_ctx,
Expand Down

0 comments on commit b15fed2

Please sign in to comment.