def METHOD_NAME(
        name,
        toolchain_repo,
        target_arch,
        clang_version,
        libc_version = HOST_GLIBC_VERSION,
        host_arch = "x86_64",
        host_libc_version = HOST_GLIBC_VERSION,
        use_for_host_tools = False):
    clang_toolchain(
        name = name,
        toolchain_repo = toolchain_repo,
        target_arch = target_arch,
        libc_version = libc_version,
        host_arch = host_arch,
        host_libc_version = host_libc_version,
        clang_version = clang_version,
        use_for_host_tools = use_for_host_tools,
    )
    native.register_toolchains("@{name}//:toolchain".format(name = name))