1""" 2This file is copied from the SkCMS repository. Original file: 3https://skia.googlesource.com/skcms/+/ba39d81f9797aa973bdf01aa6b0363b280352fba/toolchain/download_ndk_linux_amd64.bzl 4""" 5 6load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") 7 8# Path to the Android NDK from the point of view of the cc_toolchain rule. 9# Note how this matches the name in http_archive. 10NDK_PATH = "external/ndk_linux_amd64" 11 12def download_ndk_linux_amd64_toolchain(name): 13 """Downloads the Android NDK under external/ndk_linux_amd64.""" 14 15 # Archive taken from https://github.com/android/ndk/wiki/Unsupported-Downloads#r21e. 16 http_archive( 17 name = "ndk_linux_amd64", 18 urls = [ 19 "https://dl.google.com/android/repository/android-ndk-r21e-linux-x86_64.zip", 20 "https://storage.googleapis.com/skia-world-readable/bazel/ad7ce5467e18d40050dc51b8e7affc3e635c85bd8c59be62de32352328ed467e.zip", 21 ], 22 sha256 = "ad7ce5467e18d40050dc51b8e7affc3e635c85bd8c59be62de32352328ed467e", 23 strip_prefix = "android-ndk-r21e", 24 build_file = Label("//toolchain:ndk.BUILD"), 25 ) 26