blob: ea7f3c81d28f6e3085dfc9e0c0f6ccdbd6637ed4 [file] [log] [blame]
"""Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "0c3d22a5926dd7d6fd28682683abd9d476f8e78b"
LLVM_SHA256 = "f0481fe1159456cf09d976b7e77573c388ebfe93c028b5f16387364ebed76957"
tf_http_archive(
name = name,
sha256 = LLVM_SHA256,
strip_prefix = "llvm-project-{commit}".format(commit = LLVM_COMMIT),
urls = [
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/llvm/llvm-project/archive/{commit}.tar.gz".format(commit = LLVM_COMMIT),
"https://github.com/llvm/llvm-project/archive/{commit}.tar.gz".format(commit = LLVM_COMMIT),
],
build_file = "//third_party/llvm:llvm.BUILD",
patch_file = ["//third_party/llvm:macos_build_fix.patch"],
link_files = {"//third_party/llvm:run_lit.sh": "mlir/run_lit.sh"},
)