diff --git a/python/private/BUILD.bazel b/python/private/BUILD.bazel index 8410f3154e..39af217bfe 100644 --- a/python/private/BUILD.bazel +++ b/python/private/BUILD.bazel @@ -631,7 +631,6 @@ bzl_library( ], ) -# @rules_cc does not offer a bzl_library target for @rules_cc//cc:defs.bzl bzl_library( name = "rules_cc_srcs_bzl", srcs = [ @@ -644,7 +643,10 @@ bzl_library( "@rules_cc//cc/common", "@rules_cc//cc/toolchains:toolchain_rules", ], - deps = [":bazel_tools_bzl"], + deps = [ + ":bazel_tools_bzl", + "@rules_cc//cc/common", + ], ) bzl_library( diff --git a/python/private/attributes.bzl b/python/private/attributes.bzl index a863e195bb..e62abf9f71 100644 --- a/python/private/attributes.bzl +++ b/python/private/attributes.bzl @@ -14,7 +14,7 @@ """Attributes for Python rules.""" load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo") -load("@rules_cc//cc:defs.bzl", "CcInfo") +load("@rules_cc//cc/common:cc_info.bzl", "CcInfo") load(":common.bzl", "union_attrs") load(":enum.bzl", "enum") load(":flags.bzl", "PrecompileFlag", "PrecompileSourceRetentionFlag") diff --git a/python/private/common_bazel.bzl b/python/private/common_bazel.bzl index 642cfd86cc..9e1f3a8578 100644 --- a/python/private/common_bazel.bzl +++ b/python/private/common_bazel.bzl @@ -15,7 +15,8 @@ load("@bazel_skylib//lib:paths.bzl", "paths") load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo") -load("@rules_cc//cc:defs.bzl", "CcInfo", "cc_common") +load("@rules_cc//cc/common:cc_common.bzl", "cc_common") +load("@rules_cc//cc/common:cc_info.bzl", "CcInfo") load(":attributes.bzl", "PrecompileAttr", "PrecompileInvalidationModeAttr", "PrecompileSourceRetentionAttr") load(":common.bzl", "is_bool") load(":flags.bzl", "PrecompileFlag") diff --git a/python/private/current_py_cc_headers.bzl b/python/private/current_py_cc_headers.bzl index e72199efcd..217904c22f 100644 --- a/python/private/current_py_cc_headers.bzl +++ b/python/private/current_py_cc_headers.bzl @@ -14,7 +14,7 @@ """Implementation of current_py_cc_headers rule.""" -load("@rules_cc//cc:defs.bzl", "CcInfo") +load("@rules_cc//cc/common:cc_info.bzl", "CcInfo") def _current_py_cc_headers_impl(ctx): py_cc_toolchain = ctx.toolchains["//python/cc:toolchain_type"].py_cc_toolchain diff --git a/python/private/current_py_cc_libs.bzl b/python/private/current_py_cc_libs.bzl index d66c401863..ca68346bcb 100644 --- a/python/private/current_py_cc_libs.bzl +++ b/python/private/current_py_cc_libs.bzl @@ -14,7 +14,7 @@ """Implementation of current_py_cc_libs rule.""" -load("@rules_cc//cc:defs.bzl", "CcInfo") +load("@rules_cc//cc/common:cc_info.bzl", "CcInfo") def _current_py_cc_libs_impl(ctx): py_cc_toolchain = ctx.toolchains["//python/cc:toolchain_type"].py_cc_toolchain diff --git a/python/private/hermetic_runtime_repo_setup.bzl b/python/private/hermetic_runtime_repo_setup.bzl index 3f7bb5d773..d041be5964 100644 --- a/python/private/hermetic_runtime_repo_setup.bzl +++ b/python/private/hermetic_runtime_repo_setup.bzl @@ -13,7 +13,8 @@ # limitations under the License. """Setup a python-build-standalone based toolchain.""" -load("@rules_cc//cc:defs.bzl", "cc_import", "cc_library") +load("@rules_cc//cc:cc_import.bzl", "cc_import") +load("@rules_cc//cc:cc_library.bzl", "cc_library") load("//python:py_runtime.bzl", "py_runtime") load("//python:py_runtime_pair.bzl", "py_runtime_pair") load("//python/cc:py_cc_toolchain.bzl", "py_cc_toolchain") diff --git a/python/private/local_runtime_repo_setup.bzl b/python/private/local_runtime_repo_setup.bzl index 3fa484e7c7..37eab59575 100644 --- a/python/private/local_runtime_repo_setup.bzl +++ b/python/private/local_runtime_repo_setup.bzl @@ -15,7 +15,7 @@ """Setup code called by the code generated by `local_runtime_repo`.""" load("@bazel_skylib//lib:selects.bzl", "selects") -load("@rules_cc//cc:defs.bzl", "cc_library") +load("@rules_cc//cc:cc_library.bzl", "cc_library") load("@rules_python//python:py_runtime.bzl", "py_runtime") load("@rules_python//python:py_runtime_pair.bzl", "py_runtime_pair") load("@rules_python//python/cc:py_cc_toolchain.bzl", "py_cc_toolchain") diff --git a/python/private/py_cc_link_params_info.bzl b/python/private/py_cc_link_params_info.bzl index e5f4534c70..bfa2de5978 100644 --- a/python/private/py_cc_link_params_info.bzl +++ b/python/private/py_cc_link_params_info.bzl @@ -13,7 +13,7 @@ # limitations under the License. """Providers for Python rules.""" -load("@rules_cc//cc:defs.bzl", "CcInfo") +load("@rules_cc//cc/common:cc_info.bzl", "CcInfo") load(":util.bzl", "define_bazel_6_provider") DEFAULT_STUB_SHEBANG = "#!/usr/bin/env python3" diff --git a/python/private/py_cc_toolchain_rule.bzl b/python/private/py_cc_toolchain_rule.bzl index 279f86cc14..d5f3b685a4 100644 --- a/python/private/py_cc_toolchain_rule.bzl +++ b/python/private/py_cc_toolchain_rule.bzl @@ -19,7 +19,7 @@ https://github.com/bazelbuild/rules_python/issues/824 is considered done. """ load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo") -load("@rules_cc//cc:defs.bzl", "CcInfo") +load("@rules_cc//cc/common:cc_info.bzl", "CcInfo") load(":py_cc_toolchain_info.bzl", "PyCcToolchainInfo") def _py_cc_toolchain_impl(ctx): diff --git a/python/private/py_executable.bzl b/python/private/py_executable.bzl index d5da922aa6..8c0487d6a1 100644 --- a/python/private/py_executable.bzl +++ b/python/private/py_executable.bzl @@ -16,7 +16,7 @@ load("@bazel_skylib//lib:dicts.bzl", "dicts") load("@bazel_skylib//lib:structs.bzl", "structs") load("@bazel_skylib//rules:common_settings.bzl", "BuildSettingInfo") -load("@rules_cc//cc:defs.bzl", "cc_common") +load("@rules_cc//cc/common:cc_common.bzl", "cc_common") load( ":attributes.bzl", "AGNOSTIC_EXECUTABLE_ATTRS", diff --git a/python/private/py_repositories.bzl b/python/private/py_repositories.bzl index f11d3d1b56..6283ad7cbc 100644 --- a/python/private/py_repositories.bzl +++ b/python/private/py_repositories.bzl @@ -60,6 +60,7 @@ def py_repositories(): urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.13/rules_cc-0.0.13.tar.gz"], ) + # Needed by rules_cc, triggerred by @rules_java_prebuilt in Bazel by using @rules_cc//cc:defs.bzl http_archive( name = "protobuf", sha256 = "da288bf1daa6c04d03a9051781caa52aceb9163586bff9aa6cfb12f69b9395aa", diff --git a/python/private/runtime_env_toolchain.bzl b/python/private/runtime_env_toolchain.bzl index 1601926178..2116012c03 100644 --- a/python/private/runtime_env_toolchain.bzl +++ b/python/private/runtime_env_toolchain.bzl @@ -13,7 +13,7 @@ # limitations under the License. """Definitions related to the Python toolchain.""" -load("@rules_cc//cc:defs.bzl", "cc_library") +load("@rules_cc//cc:cc_library.bzl", "cc_library") load("//python:py_runtime.bzl", "py_runtime") load("//python:py_runtime_pair.bzl", "py_runtime_pair") load("//python/cc:py_cc_toolchain.bzl", "py_cc_toolchain") diff --git a/python/private/whl_filegroup/whl_filegroup.bzl b/python/private/whl_filegroup/whl_filegroup.bzl index c5f97e697b..d2e6e43b91 100644 --- a/python/private/whl_filegroup/whl_filegroup.bzl +++ b/python/private/whl_filegroup/whl_filegroup.bzl @@ -27,7 +27,7 @@ An empty pattern will match all files. Example usage: ```starlark -load("@rules_cc//cc:defs.bzl", "cc_library") +load("@rules_cc//cc:cc_library.bzl", "cc_library") load("@rules_python//python:pip.bzl", "whl_filegroup") whl_filegroup( diff --git a/tests/cc/current_py_cc_headers/current_py_cc_headers_tests.bzl b/tests/cc/current_py_cc_headers/current_py_cc_headers_tests.bzl index 8bbdaceaf0..d07d08ac61 100644 --- a/tests/cc/current_py_cc_headers/current_py_cc_headers_tests.bzl +++ b/tests/cc/current_py_cc_headers/current_py_cc_headers_tests.bzl @@ -14,7 +14,7 @@ """Tests for current_py_cc_headers.""" -load("@rules_cc//cc:defs.bzl", "CcInfo") +load("@rules_cc//cc/common:cc_info.bzl", "CcInfo") load("@rules_testing//lib:analysis_test.bzl", "analysis_test", "test_suite") load("@rules_testing//lib:truth.bzl", "matching") load("//tests/support:cc_info_subject.bzl", "cc_info_subject") diff --git a/tests/cc/current_py_cc_libs/current_py_cc_libs_tests.bzl b/tests/cc/current_py_cc_libs/current_py_cc_libs_tests.bzl index 4a08ce745e..26f97244d8 100644 --- a/tests/cc/current_py_cc_libs/current_py_cc_libs_tests.bzl +++ b/tests/cc/current_py_cc_libs/current_py_cc_libs_tests.bzl @@ -14,7 +14,7 @@ """Tests for current_py_cc_libs.""" -load("@rules_cc//cc:defs.bzl", "CcInfo") +load("@rules_cc//cc/common:cc_info.bzl", "CcInfo") load("@rules_testing//lib:analysis_test.bzl", "analysis_test", "test_suite") load("@rules_testing//lib:truth.bzl", "matching") load("//tests/support:cc_info_subject.bzl", "cc_info_subject") diff --git a/tests/support/cc_toolchains/BUILD.bazel b/tests/support/cc_toolchains/BUILD.bazel index 889f9e02d2..f6e6654d09 100644 --- a/tests/support/cc_toolchains/BUILD.bazel +++ b/tests/support/cc_toolchains/BUILD.bazel @@ -12,7 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -load("@rules_cc//cc:defs.bzl", "cc_toolchain", "cc_toolchain_suite") +load("@rules_cc//cc/toolchains:cc_toolchain.bzl", "cc_toolchain") +load("@rules_cc//cc/toolchains:cc_toolchain_suite.bzl", "cc_toolchain_suite") load("@rules_testing//lib:util.bzl", "PREVENT_IMPLICIT_BUILDING_TAGS") load("//python/cc:py_cc_toolchain.bzl", "py_cc_toolchain") load(":fake_cc_toolchain_config.bzl", "fake_cc_toolchain_config") diff --git a/tests/support/cc_toolchains/fake_cc_toolchain_config.bzl b/tests/support/cc_toolchains/fake_cc_toolchain_config.bzl index a2ad615e6e..8240f09e04 100644 --- a/tests/support/cc_toolchains/fake_cc_toolchain_config.bzl +++ b/tests/support/cc_toolchains/fake_cc_toolchain_config.bzl @@ -14,7 +14,7 @@ """Fake for providing CcToolchainConfigInfo.""" -load("@rules_cc//cc:defs.bzl", "cc_common") +load("@rules_cc//cc/common:cc_common.bzl", "cc_common") def _impl(ctx): return cc_common.create_cc_toolchain_config_info( diff --git a/tests/whl_filegroup/BUILD.bazel b/tests/whl_filegroup/BUILD.bazel index d8b711d120..2176e9e03a 100644 --- a/tests/whl_filegroup/BUILD.bazel +++ b/tests/whl_filegroup/BUILD.bazel @@ -1,5 +1,6 @@ load("@bazel_skylib//rules:write_file.bzl", "write_file") -load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test") +load("@rules_cc//cc:cc_library.bzl", "cc_library") +load("@rules_cc//cc:cc_test.bzl", "cc_test") load("//python:defs.bzl", "py_library", "py_test") load("//python:packaging.bzl", "py_package", "py_wheel") load("//python:pip.bzl", "whl_filegroup")