mirror of https://github.com/bazelbuild/rules_cc
Instead disable the buildifier warning
This commit is contained in:
parent
65436199d8
commit
0e4443f2ca
|
@ -173,17 +173,13 @@ cc_autoconf = repository_rule(
|
|||
configure = True,
|
||||
)
|
||||
|
||||
def cc_configure(name = "local_config_cc"):
|
||||
"""A C++ configuration rules that generate the crosstool file.
|
||||
|
||||
Args:
|
||||
name: name of the repository
|
||||
"""
|
||||
cc_autoconf_toolchains(name = name + "_toolchains")
|
||||
cc_autoconf(name = name)
|
||||
if name == "local_config_cc":
|
||||
native.bind(name = "cc_toolchain", actual = "@local_config_cc//:toolchain")
|
||||
# buildifier: disable=unnamed-macro
|
||||
def cc_configure():
|
||||
"""A C++ configuration rules that generate the crosstool file."""
|
||||
cc_autoconf_toolchains(name = "local_config_cc_toolchains")
|
||||
cc_autoconf(name = "local_config_cc")
|
||||
native.bind(name = "cc_toolchain", actual = "@local_config_cc//:toolchain")
|
||||
native.register_toolchains(
|
||||
# Use register_toolchain's target pattern expansion to register all toolchains in the package.
|
||||
"@" + name + "_toolchains//:all",
|
||||
"@local_config_cc_toolchains//:all",
|
||||
)
|
||||
|
|
|
@ -23,8 +23,9 @@ def rules_cc_dependencies():
|
|||
],
|
||||
)
|
||||
|
||||
def rules_cc_toolchains(name = "local_config_cc", *args):
|
||||
cc_configure(name, *args)
|
||||
# buildifier: disable=unnamed-macro
|
||||
def rules_cc_toolchains(*args):
|
||||
cc_configure(*args)
|
||||
|
||||
def _maybe(repo_rule, name, **kwargs):
|
||||
if not native.existing_rule(name):
|
||||
|
|
Loading…
Reference in New Issue