| """Provides the repository macro to import LLVM.""" |
| |
| load("//third_party:repo.bzl", "tf_http_archive") |
| |
| def repo(name): |
| """Imports LLVM.""" |
| LLVM_COMMIT = "72136d8ba266eea6ce30fbc0e521c7b01a13b378" |
| LLVM_SHA256 = "54d179116e7a79eb1fdf7819aad62b4d76bc0e15e8567871cae9b675f7dec5c1" |
| |
| 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:infer_type.patch", # TODO(b/231285230): remove once resolved |
| "//third_party/llvm:build.patch", |
| "//third_party/llvm:toolchains.patch", |
| ], |
| link_files = {"//third_party/llvm:run_lit.sh": "mlir/run_lit.sh"}, |
| ) |