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 = "955b91c19c00ed4c917559a5d66d14c669dde2e3"
    LLVM_SHA256 = "64d5d7be95c3f8819ef3c82b813ad345f1ae8d827afc451653da380c60325245"
9 10 11 12 13 14 15 16 17

    tf_http_archive(
        name = name,
        sha256 = LLVM_SHA256,
        strip_prefix = "llvm-project-" + 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),
        ],
18
        link_files = {
19 20
            "//third_party/llvm:llvm.autogenerated.BUILD": "llvm/BUILD",
            "//third_party/mlir:BUILD": "mlir/BUILD",
21 22 23
            "//third_party/mlir:build_defs.bzl": "mlir/build_defs.bzl",
            "//third_party/mlir:linalggen.bzl": "mlir/linalggen.bzl",
            "//third_party/mlir:tblgen.bzl": "mlir/tblgen.bzl",
24 25 26
            "//third_party/mlir:test.BUILD": "mlir/test/BUILD",
        },
    )