mirror of https://github.com/bazelbuild/rules_cc
Add rules_cc_toolchains to repositories.bzl
This is the new entry point for registering C++ toolchains (replacing implicit cc_configure()). While at it, fix one misnamed function.
This commit is contained in:
parent
262ebec3c2
commit
4f8676f6ca
|
@ -54,3 +54,6 @@ load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_
|
||||||
rules_proto_dependencies()
|
rules_proto_dependencies()
|
||||||
|
|
||||||
rules_proto_toolchains()
|
rules_proto_toolchains()
|
||||||
|
|
||||||
|
load("//cc:repositories.bzl", "rules_cc_toolchains")
|
||||||
|
rules_proto_toolchains()
|
||||||
|
|
|
@ -252,7 +252,7 @@ def _get_no_canonical_prefixes_opt(repository_ctx, cc):
|
||||||
)
|
)
|
||||||
return opt
|
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!
|
"""Convert the environment in a list of export if in Homebrew. Doesn't %-escape the result!
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
# Ideally we'd delete this entire file.
|
# Ideally we'd delete this entire file.
|
||||||
|
|
||||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||||
|
load("//cc/private/toolchain:cc_configure.bzl", "cc_configure")
|
||||||
|
|
||||||
def rules_cc_dependencies():
|
def rules_cc_dependencies():
|
||||||
_maybe(
|
_maybe(
|
||||||
|
@ -22,6 +23,9 @@ def rules_cc_dependencies():
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def rules_cc_toolchains(*args):
|
||||||
|
cc_configure(*args)
|
||||||
|
|
||||||
def _maybe(repo_rule, name, **kwargs):
|
def _maybe(repo_rule, name, **kwargs):
|
||||||
if not native.existing_rule(name):
|
if not native.existing_rule(name):
|
||||||
repo_rule(name = name, **kwargs)
|
repo_rule(name = name, **kwargs)
|
||||||
|
|
Loading…
Reference in New Issue