diff --git a/WORKSPACE b/WORKSPACE index 87a57de..c7c274b 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -54,3 +54,6 @@ load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_ rules_proto_dependencies() rules_proto_toolchains() + +load("//cc:repositories.bzl", "rules_cc_toolchains") +rules_proto_toolchains() diff --git a/cc/private/toolchain/unix_cc_configure.bzl b/cc/private/toolchain/unix_cc_configure.bzl index 856486e..707104e 100644 --- a/cc/private/toolchain/unix_cc_configure.bzl +++ b/cc/private/toolchain/unix_cc_configure.bzl @@ -252,7 +252,7 @@ def _get_no_canonical_prefixes_opt(repository_ctx, cc): ) return opt -def _get_env(repository_ctx): +def get_env(repository_ctx): """Convert the environment in a list of export if in Homebrew. Doesn't %-escape the result! Args: diff --git a/cc/repositories.bzl b/cc/repositories.bzl index bb41c86..4e1dd8f 100644 --- a/cc/repositories.bzl +++ b/cc/repositories.bzl @@ -9,6 +9,7 @@ # Ideally we'd delete this entire file. load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") +load("//cc/private/toolchain:cc_configure.bzl", "cc_configure") def rules_cc_dependencies(): _maybe( @@ -22,6 +23,9 @@ def rules_cc_dependencies(): ], ) +def rules_cc_toolchains(*args): + cc_configure(*args) + def _maybe(repo_rule, name, **kwargs): if not native.existing_rule(name): repo_rule(name = name, **kwargs)