1""" 2This file exports the various toolchains for the hosts that we support building Skia on. 3 4Supported: 5 - Linux amd64 6 - Mac (one toolchain for both M1 and Intel CPUs) 7 8Planned: 9 - Windows amd64 10 11""" 12 13load(":download_linux_amd64_toolchain.bzl", "download_linux_amd64_toolchain") 14load(":download_mac_toolchain.bzl", "download_mac_toolchain") 15 16# This key in this dictionary (and thus the name passed into the rule) controls what the subfolder 17# will be called in the external directory. It must match what we use in the appropriate 18# toolchain_config.bzl file or it will not be able to locate the sysroot to build with. 19name_toolchain = { 20 "clang_linux_amd64": download_linux_amd64_toolchain, 21 "clang_mac": download_mac_toolchain, 22} 23 24def download_toolchains_for_skia(*args): 25 """ 26 Point Bazel to the correct rules for downloading the different toolchains. 27 28 Args: 29 *args: multiple toolchains, see top of file for 30 list of supported toolchains. 31 """ 32 33 for toolchain_name in args: 34 if toolchain_name not in name_toolchain: 35 fail("unrecognized toolchain name " + toolchain_name) 36 download_toolchain = name_toolchain[toolchain_name] 37 download_toolchain(name = toolchain_name) 38