# This file is licensed under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "bazel_skylib", sha256 = "74d544d96f4a5bb630d465ca8bbcfe231e3594e5aae57e1edbf17a6eb3ca2506", urls = [ "https://github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz", "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz", ], ) load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") bazel_skylib_workspace() new_local_repository( name = "llvm-raw", build_file_content = "# empty", path = "../../externals/llvm-project", ) load("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure", "llvm_disable_optional_support_deps") llvm_configure( name = "llvm-project", repo_mapping = { "@python_runtime": "@local_config_python", }, targets = [ "X86", ], ) llvm_disable_optional_support_deps() local_repository( name = "mlir-hlo", path = "../../externals/mlir-hlo/", ) new_local_repository( name = "torch-mlir-raw", build_file_content = "# empty", path = "../../", ) load("@torch-mlir-raw//utils/bazel:configure.bzl", "torch_mlir_configure") torch_mlir_configure( name = "torch-mlir", ) ####### Buildifier Deps # https://github.com/bazelbuild/buildtools/blob/master/buildifier/README.md load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # buildifier is written in Go and hence needs rules_go to be built. # See https://github.com/bazelbuild/rules_go for the up to date setup instructions. http_archive( name = "io_bazel_rules_go", sha256 = "d6b2513456fe2229811da7eb67a444be7785f5323c6708b38d851d2b51e54d83", urls = [ "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.30.0/rules_go-v0.30.0.zip", "https://github.com/bazelbuild/rules_go/releases/download/v0.30.0/rules_go-v0.30.0.zip", ], ) load("@io_bazel_rules_go//go:deps.bzl", "go_rules_dependencies") go_rules_dependencies() load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains") go_register_toolchains(version = "1.17.2") http_archive( name = "bazel_gazelle", sha256 = "de69a09dc70417580aabf20a28619bb3ef60d038470c7cf8442fafcf627c21cb", urls = [ "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz", "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz", ], ) load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") # If you use WORKSPACE.bazel, use the following line instead of the bare gazelle_dependencies(): gazelle_dependencies(go_repository_default_config = "@//:WORKSPACE.bazel") # gazelle_dependencies() http_archive( name = "com_google_protobuf", sha256 = "3bd7828aa5af4b13b99c191e8b1e884ebfa9ad371b0ce264605d347f135d2568", strip_prefix = "protobuf-3.19.4", urls = [ "https://github.com/protocolbuffers/protobuf/archive/v3.19.4.tar.gz", ], ) load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") protobuf_deps() http_archive( name = "com_github_bazelbuild_buildtools", sha256 = "ae34c344514e08c23e90da0e2d6cb700fcd28e80c02e23e4d5715dddcb42f7b3", strip_prefix = "buildtools-4.2.2", urls = [ "https://github.com/bazelbuild/buildtools/archive/refs/tags/4.2.2.tar.gz", ], )