Skip to content

Commit 576e6dc

Browse files
comiusrickeylev
andauthored
chore: remove references to @rules_cc//cc:defs.bzl (bazel-contrib#2293)
Referring to @rules_cc//cc:defs.bzl, refers to @protobuf//bazel:cc_proto_library.bzl, which fetches protobuf repository. Referring directly to what's needed limits the fetches just to rules_cc. Fix reference to bzl libs in rules_cc that are needed for docs generation. This requires rules_cc 0.0.13 or higher. Work towards bazel-contrib#2387, bazel-contrib#2378 --------- Co-authored-by: Richard Levasseur <rlevasseur@google.com>
1 parent 4864d63 commit 576e6dc

18 files changed

+25
-18
lines changed

python/private/BUILD.bazel

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,6 @@ bzl_library(
631631
],
632632
)
633633

634-
# @rules_cc does not offer a bzl_library target for @rules_cc//cc:defs.bzl
635634
bzl_library(
636635
name = "rules_cc_srcs_bzl",
637636
srcs = [
@@ -644,7 +643,10 @@ bzl_library(
644643
"@rules_cc//cc/common",
645644
"@rules_cc//cc/toolchains:toolchain_rules",
646645
],
647-
deps = [":bazel_tools_bzl"],
646+
deps = [
647+
":bazel_tools_bzl",
648+
"@rules_cc//cc/common",
649+
],
648650
)
649651

650652
bzl_library(

python/private/attributes.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"""Attributes for Python rules."""
1515

1616
load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo")
17-
load("@rules_cc//cc:defs.bzl", "CcInfo")
17+
load("@rules_cc//cc/common:cc_info.bzl", "CcInfo")
1818
load(":common.bzl", "union_attrs")
1919
load(":enum.bzl", "enum")
2020
load(":flags.bzl", "PrecompileFlag", "PrecompileSourceRetentionFlag")

python/private/common_bazel.bzl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515

1616
load("@bazel_skylib//lib:paths.bzl", "paths")
1717
load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo")
18-
load("@rules_cc//cc:defs.bzl", "CcInfo", "cc_common")
18+
load("@rules_cc//cc/common:cc_common.bzl", "cc_common")
19+
load("@rules_cc//cc/common:cc_info.bzl", "CcInfo")
1920
load(":attributes.bzl", "PrecompileAttr", "PrecompileInvalidationModeAttr", "PrecompileSourceRetentionAttr")
2021
load(":common.bzl", "is_bool")
2122
load(":flags.bzl", "PrecompileFlag")

python/private/current_py_cc_headers.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
"""Implementation of current_py_cc_headers rule."""
1616

17-
load("@rules_cc//cc:defs.bzl", "CcInfo")
17+
load("@rules_cc//cc/common:cc_info.bzl", "CcInfo")
1818

1919
def _current_py_cc_headers_impl(ctx):
2020
py_cc_toolchain = ctx.toolchains["//python/cc:toolchain_type"].py_cc_toolchain

python/private/current_py_cc_libs.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
"""Implementation of current_py_cc_libs rule."""
1616

17-
load("@rules_cc//cc:defs.bzl", "CcInfo")
17+
load("@rules_cc//cc/common:cc_info.bzl", "CcInfo")
1818

1919
def _current_py_cc_libs_impl(ctx):
2020
py_cc_toolchain = ctx.toolchains["//python/cc:toolchain_type"].py_cc_toolchain

python/private/hermetic_runtime_repo_setup.bzl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
# limitations under the License.
1414
"""Setup a python-build-standalone based toolchain."""
1515

16-
load("@rules_cc//cc:defs.bzl", "cc_import", "cc_library")
16+
load("@rules_cc//cc:cc_import.bzl", "cc_import")
17+
load("@rules_cc//cc:cc_library.bzl", "cc_library")
1718
load("//python:py_runtime.bzl", "py_runtime")
1819
load("//python:py_runtime_pair.bzl", "py_runtime_pair")
1920
load("//python/cc:py_cc_toolchain.bzl", "py_cc_toolchain")

python/private/local_runtime_repo_setup.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"""Setup code called by the code generated by `local_runtime_repo`."""
1616

1717
load("@bazel_skylib//lib:selects.bzl", "selects")
18-
load("@rules_cc//cc:defs.bzl", "cc_library")
18+
load("@rules_cc//cc:cc_library.bzl", "cc_library")
1919
load("@rules_python//python:py_runtime.bzl", "py_runtime")
2020
load("@rules_python//python:py_runtime_pair.bzl", "py_runtime_pair")
2121
load("@rules_python//python/cc:py_cc_toolchain.bzl", "py_cc_toolchain")

python/private/py_cc_link_params_info.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414
"""Providers for Python rules."""
1515

16-
load("@rules_cc//cc:defs.bzl", "CcInfo")
16+
load("@rules_cc//cc/common:cc_info.bzl", "CcInfo")
1717
load(":util.bzl", "define_bazel_6_provider")
1818

1919
DEFAULT_STUB_SHEBANG = "#!/usr/bin/env python3"

python/private/py_cc_toolchain_rule.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ https://github.com/bazelbuild/rules_python/issues/824 is considered done.
1919
"""
2020

2121
load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo")
22-
load("@rules_cc//cc:defs.bzl", "CcInfo")
22+
load("@rules_cc//cc/common:cc_info.bzl", "CcInfo")
2323
load(":py_cc_toolchain_info.bzl", "PyCcToolchainInfo")
2424

2525
def _py_cc_toolchain_impl(ctx):

python/private/py_executable.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
load("@bazel_skylib//lib:dicts.bzl", "dicts")
1717
load("@bazel_skylib//lib:structs.bzl", "structs")
1818
load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo")
19-
load("@rules_cc//cc:defs.bzl", "cc_common")
19+
load("@rules_cc//cc/common:cc_common.bzl", "cc_common")
2020
load(
2121
":attributes.bzl",
2222
"AGNOSTIC_EXECUTABLE_ATTRS",

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy