Merge pull request #253 from meteorcloudy:fix_compatibility

PiperOrigin-RevId: 689379342
Change-Id: Ia90576c00b917bf58a53362981d1f3e775d6dfd5
This commit is contained in:
Copybara-Service 2024-10-24 07:51:08 -07:00
commit faeafdb828
2 changed files with 6 additions and 1 deletions

View File

@ -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")

View File

@ -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")
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)