Skip to content

Commit

Permalink
Just use bazel_features
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed Feb 6, 2025
1 parent 6cebab8 commit 921237c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion crosstool/setup.bzl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Configure the Apple CC toolchain"""

load("@bazel_features//:features.bzl", "bazel_features")
load("//crosstool:osx_cc_configure.bzl", "configure_osx_toolchain")

_DISABLE_ENV_VAR = "BAZEL_NO_APPLE_CPP_TOOLCHAIN"
Expand Down Expand Up @@ -79,8 +80,12 @@ def apple_cc_configure():
"@local_config_apple_cc_toolchains//:all",
)

def _apple_cc_configure_extension_impl(_):
def _apple_cc_configure_extension_impl(mctx):
_apple_cc_autoconf_toolchains(name = "local_config_apple_cc_toolchains")
_apple_cc_autoconf(name = "local_config_apple_cc")
if bazel_features.external_deps.extension_metadata_has_reproducible:
return mctx.extension_metadata(reproducible = True)
else:
return None

apple_cc_configure_extension = module_extension(implementation = _apple_cc_configure_extension_impl)

0 comments on commit 921237c

Please sign in to comment.