def METHOD_NAME(repository_ctx, overriden_tools = dict()):
    """Generate BUILD file with 'cc_toolchain' targets for the local host C++ toolchain.
    Args:
       repository_ctx: repository context
       overriden_tools: dict of tool paths to use instead of autoconfigured tools
    """
    cpu_value = get_cpu_value(repository_ctx)
    if cpu_value.startswith("darwin"):
        print("Configuring local C++ toolchain for Darwin. This is non-hermetic and builds may " + 
        "not be reproducible. Consider building on linux for a hermetic build.")
        configure_unix_toolchain(repository_ctx, cpu_value, overriden_tools)
    else: 
        paths = resolve_labels(repository_ctx, [
            "@bazel_tools//tools/cpp:BUILD.empty.tpl",
            "@bazel_tools//tools/cpp:empty_cc_toolchain_config.bzl",
        ])
        repository_ctx.symlink(paths["@bazel_tools//tools/cpp:empty_cc_toolchain_config.bzl"], "cc_toolchain_config.bzl")
        repository_ctx.template("BUILD", paths["@bazel_tools//tools/cpp:BUILD.empty.tpl"], {
            "%{cpu}": get_cpu_value(repository_ctx),
        })