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