################################################################
# %toolchainName%
################################################################

cc_toolchain(
    name = "%toolchainName%",
    all_files = ":%toolchainName%-all_files",
    compiler_files = ":%toolchainName%-all_files",
    cpu = "%cpu%",
    dwp_files = ":%toolchainName%-toolchain_files",
    dynamic_runtime_libs = [":%dynamicRuntimeLibs%"],
    linker_files = ":%toolchainName%-all_files",
    objcopy_files = ":%toolchainName%-toolchain_files",
    static_runtime_libs = [":%staticRuntimeLibs%"],
    strip_files = ":%toolchainName%-toolchain_files",
    supports_param_files = 0,
)

filegroup(
    name = "%toolchainName%-toolchain_files",
    srcs = glob(["ndk/toolchains/%toolchainDirectory%/**"]),
    output_licenses = ["unencumbered"],
)

filegroup(
    name = "%toolchainName%-all_files",
    srcs = [
        ":%toolchainName%-toolchain_files",
    ] + glob([
        %toolchainFileGlobs%
    ]),
)

