Debian Codegraph @

toolchain/download_ndk_linux_amd64_toolchain.bzl

raw
1 load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
2
3 # Path to the Android NDK from the point of view of the cc_toolchain rule.
4 # This name is because of how the module use_repo prefixes extensions
5 NDK_PATH = "external/+download_ndk_linux_amd64_toolchain+ndk_linux_amd64"
6
7 def _download_ndk_linux_amd64_toolchain_impl(ctx):
8 """Downloads the Android NDK under external/ndk_linux_amd64."""
9
10 # Archive taken from https://github.com/android/ndk/wiki/Unsupported-Downloads#r21e.
11 http_archive(
12 name = "ndk_linux_amd64",
13 urls = [
14 "https://dl.google.com/android/repository/android-ndk-r21e-linux-x86_64.zip",
15 "https://cdn.skia.org/bazel/ad7ce5467e18d40050dc51b8e7affc3e635c85bd8c59be62de32352328ed467e.zip",
16 ],
17 sha256 = "ad7ce5467e18d40050dc51b8e7affc3e635c85bd8c59be62de32352328ed467e",
18 strip_prefix = "android-ndk-r21e",
19 build_file = Label("//toolchain:ndk.BUILD"),
20 )
21
22 download_ndk_linux_amd64_toolchain = module_extension(
23 implementation = _download_ndk_linux_amd64_toolchain_impl,
24 )