| """Provides the repository macro to import LLVM.""" |
| |
| load("//third_party:repo.bzl", "tf_http_archive") |
| |
| def repo(name): |
| """Imports LLVM.""" |
| LLVM_COMMIT = "4c564940a14f55d2315d2676b10fea0660ea814a" |
| LLVM_SHA256 = "3118b9c0d9d2b8a74219f9f9fdc3adffcce860e7b46b80d7c11a65d10d0d0fe0" |
| |
| 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", "//third_party/llvm:fix_ppc64le.patch", "//third_party/llvm:disable_typeid_check.patch"], |
| link_files = {"//third_party/llvm:run_lit.sh": "mlir/run_lit.sh"}, |
| ) |