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

cc_toolchain(
    name = "%toolchainName%",
    all_files = ":%toolchainName%-all_files",
    compiler_files = ":%toolchainName%-toolchain_files",
    cpu = "%cpu%",
    dwp_files = ":%toolchainName%-toolchain_files",
    dynamic_runtime_libs = [":%dynamicRuntimeLibs%"],
    linker_files = ":%toolchainName%-toolchain_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(["toolchains/%toolchainDirectory%/**"]),
    output_licenses = ["unencumbered"],
)

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


################################################################
# %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%-toolchain_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(["toolchains/%toolchainDirectory%/**"]),
    output_licenses = ["unencumbered"],
)

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


Add the include paths to the compiler_files attribute of the cc_toolchains for the generated Android NDK crosstool so that compilation works when sandboxed.
Add the include paths to the compiler_files attribute of the cc_toolchains
for the generated Android NDK crosstool so that compilation works when sandboxed.

--
MOS_MIGRATED_REVID=106092381
