mirror of
https://github.com/bazelbuild/rules_cc
synced 2024-11-26 20:02:22 +00:00
Restore compatibility with Bazel 6
This commit is contained in:
parent
ba3ec91a55
commit
f7ca57feac
|
@ -4,6 +4,7 @@ module(
|
|||
compatibility_level = 1,
|
||||
)
|
||||
|
||||
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")
|
||||
|
|
|
@ -13,11 +13,15 @@
|
|||
# limitations under the License.
|
||||
"""Module extension for cc auto configuration."""
|
||||
|
||||
load("@bazel_features//:features.bzl", "bazel_features")
|
||||
load("//cc/private/toolchain:cc_configure.bzl", "cc_autoconf", "cc_autoconf_toolchains")
|
||||
|
||||
def _cc_configure_extension_impl(ctx):
|
||||
cc_autoconf_toolchains(name = "local_config_cc_toolchains")
|
||||
cc_autoconf(name = "local_config_cc")
|
||||
return ctx.extension_metadata(reproducible = True)
|
||||
if bazel_features.external_deps.extension_metadata_has_reproducible:
|
||||
return ctx.extension_metadata(reproducible = True)
|
||||
else:
|
||||
return None
|
||||
|
||||
cc_configure_extension = module_extension(implementation = _cc_configure_extension_impl)
|
||||
|
|
Loading…
Reference in a new issue