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,
|
configure = True,
|
||||||
)
|
)
|
||||||
|
|
||||||
def cc_configure(name = "local_config_cc"):
|
# buildifier: disable=unnamed-macro
|
||||||
"""A C++ configuration rules that generate the crosstool file.
|
def cc_configure():
|
||||||
|
"""A C++ configuration rules that generate the crosstool file."""
|
||||||
Args:
|
cc_autoconf_toolchains(name = "local_config_cc_toolchains")
|
||||||
name: name of the repository
|
cc_autoconf(name = "local_config_cc")
|
||||||
"""
|
native.bind(name = "cc_toolchain", actual = "@local_config_cc//:toolchain")
|
||||||
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")
|
|
||||||
native.register_toolchains(
|
native.register_toolchains(
|
||||||
# Use register_toolchain's target pattern expansion to register all toolchains in the package.
|
# 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):
|
# buildifier: disable=unnamed-macro
|
||||||
cc_configure(name, *args)
|
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):
|
||||||
|
|
Loading…
Reference in New Issue