workspace.bzl 1.1 KB
Newer Older
1 2 3 4 5 6
"""Provides the repository macro to import LLVM."""

load("//third_party:repo.bzl", "tf_http_archive")

def repo(name):
    """Imports LLVM."""
7 8
    LLVM_COMMIT = "3cd3f11c174baa001b337b88c7a6507eb5705cf2"
    LLVM_SHA256 = "f6b2e53944185e4d725de4cb3c9bd29c5134d29b4b71980a1fecc9e16090d140"
9 10 11 12

    tf_http_archive(
        name = name,
        sha256 = LLVM_SHA256,
13
        strip_prefix = "llvm-project-{commit}".format(commit = LLVM_COMMIT),
14 15 16 17
        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),
        ],
18
        build_file = "//third_party/llvm:llvm.BUILD",
19
        patch_file = [
A
A. Unique TensorFlower 已提交
20
            "//third_party/llvm:generated.patch",  # Autogenerated, don't remove.
21
            "//third_party/llvm:build.patch",
22
            "//third_party/llvm:mathextras.patch",
23
            "//third_party/llvm:toolchains.patch",
24
            "//third_party/llvm:zstd.patch",
25
        ],
26
        link_files = {"//third_party/llvm:run_lit.sh": "mlir/run_lit.sh"},
27
    )