130 lines
4.9 KiB
Python
130 lines
4.9 KiB
Python
|
load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository", "new_git_repository")
|
||
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||
|
|
||
|
def clean_dep(dep):
|
||
|
return str(Label(dep))
|
||
|
|
||
|
def third_party_deps():
|
||
|
if "zlib_archive" not in native.existing_rules():
|
||
|
http_archive(
|
||
|
name = "zlib_archive",
|
||
|
build_file = "//third_party:zlib.BUILD",
|
||
|
sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1",
|
||
|
strip_prefix = "zlib-1.2.11",
|
||
|
urls = [
|
||
|
"http://mirror.tensorflow.org/zlib.net/zlib-1.2.11.tar.gz",
|
||
|
"https://zlib.net/zlib-1.2.11.tar.gz",
|
||
|
],
|
||
|
)
|
||
|
|
||
|
if "gtest" not in native.existing_rules():
|
||
|
http_archive(
|
||
|
name = "gtest",
|
||
|
sha256 = "9cbca84c4256bed17df2c8f4d00c912c19d247c11c9ba6647cd6dd5b5c996b8d",
|
||
|
strip_prefix = "googletest-9816b96a6ddc0430671693df90192bbee57108b6",
|
||
|
urls = [
|
||
|
"https://mirror.bazel.build/github.com/google/googletest/archive/9816b96a6ddc0430671693df90192bbee57108b6.zip",
|
||
|
"https://github.com/google/googletest/archive/9816b96a6ddc0430671693df90192bbee57108b6.zip",
|
||
|
],
|
||
|
)
|
||
|
|
||
|
if "glog" not in native.existing_rules():
|
||
|
git_repository(
|
||
|
name = "glog",
|
||
|
commit = "41f4bf9cbc3e8995d628b459f6a239df43c2b84a",
|
||
|
remote = "https://github.com/google/glog",
|
||
|
)
|
||
|
|
||
|
if "com_github_gflags_gflags" not in native.existing_rules():
|
||
|
http_archive(
|
||
|
name = "com_github_gflags_gflags",
|
||
|
sha256 = "34af2f15cf7367513b352bdcd2493ab14ce43692d2dcd9dfc499492966c64dcf",
|
||
|
strip_prefix = "gflags-2.2.2",
|
||
|
urls = [
|
||
|
"https://github.com/gflags/gflags/archive/v2.2.2.tar.gz",
|
||
|
],
|
||
|
)
|
||
|
|
||
|
if "pybind11" not in native.existing_rules():
|
||
|
http_archive(
|
||
|
name = "pybind11",
|
||
|
build_file = "//third_party:pybind11.BUILD",
|
||
|
sha256 = "1eed57bc6863190e35637290f97a20c81cfe4d9090ac0a24f3bbf08f265eb71d",
|
||
|
strip_prefix = "pybind11-2.4.3",
|
||
|
urls = [
|
||
|
"https://github.com/pybind/pybind11/archive/v2.4.3.tar.gz",
|
||
|
],
|
||
|
)
|
||
|
|
||
|
if "eigen" not in native.existing_rules():
|
||
|
http_archive(
|
||
|
name = "eigen",
|
||
|
build_file = "//third_party:eigen.BUILD",
|
||
|
sha256 = "d56fbad95abf993f8af608484729e3d87ef611dd85b3380a8bad1d5cbc373a57",
|
||
|
strip_prefix = "eigen-3.3.7",
|
||
|
urls = ["https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.tar.gz"],
|
||
|
)
|
||
|
|
||
|
if "google_styleguide" not in native.existing_rules():
|
||
|
new_git_repository(
|
||
|
name = "google_styleguide",
|
||
|
build_file = "//third_party:google_styleguide.BUILD",
|
||
|
commit = "91d6e367e384b0d8aaaf7ce95029514fcdf38651",
|
||
|
remote = "https://github.com/google/styleguide",
|
||
|
)
|
||
|
|
||
|
if "onnx" not in native.existing_rules():
|
||
|
new_git_repository(
|
||
|
name = "onnx",
|
||
|
build_file = "//third_party:onnx.BUILD",
|
||
|
commit = "553df22c67bee5f0fe6599cff60f1afc6748c635",
|
||
|
remote = "https://github.com/onnx/onnx",
|
||
|
)
|
||
|
|
||
|
#if "rules_foreign_cc" not in native.existing_rules():
|
||
|
# http_archive(
|
||
|
# name = "rules_foreign_cc",
|
||
|
# strip_prefix = "rules_foreign_cc-master",
|
||
|
# url = "https://github.com/bazelbuild/rules_foreign_cc/archive/master.zip",
|
||
|
# )
|
||
|
|
||
|
if "cpp-taskflow" not in native.existing_rules():
|
||
|
http_archive(
|
||
|
name = "cpp-taskflow",
|
||
|
build_file = "//third_party:cpp-taskflow.BUILD",
|
||
|
sha256 = "e32168875e18182a5796e453751715c2a7ef7beefbebe57b1f55a705de223c1e",
|
||
|
strip_prefix = "taskflow-2.3.0",
|
||
|
urls = ["https://github.com/cpp-taskflow/cpp-taskflow/archive/v2.3.0.tar.gz"],
|
||
|
)
|
||
|
|
||
|
if "clang_binary" not in native.existing_rules():
|
||
|
http_archive(
|
||
|
name = "clang_binary",
|
||
|
build_file = "@Primo//:third_party/clang_binary.BUILD",
|
||
|
url = "http://swbuild.enflame.cn/clang/clang11-20200628.tar.gz",
|
||
|
sha256 = "b51a7e534f20fe0977c5f0096d4c44fd2c3bd28661c43f4149d217540aea700c",
|
||
|
)
|
||
|
|
||
|
if "scope_guard" not in native.existing_rules():
|
||
|
new_git_repository(
|
||
|
name = "scope_guard",
|
||
|
remote = "https://github.com/ricab/scope_guard",
|
||
|
commit = "760de0a9ea0fec980a5244604ffa5b1acff2db7a",
|
||
|
build_file = "//third_party:scope_guard.BUILD",
|
||
|
)
|
||
|
|
||
|
if "dlpack" not in native.existing_rules():
|
||
|
new_git_repository(
|
||
|
name = "dlpack",
|
||
|
remote = "https://github.com/dmlc/dlpack",
|
||
|
commit = "3ec04430e89a6834e5a1b99471f415fa939bf642",
|
||
|
build_file = "//third_party:dlpack.BUILD",
|
||
|
)
|
||
|
|
||
|
def internal_deps():
|
||
|
return
|
||
|
|
||
|
def onnxmlir_deps():
|
||
|
internal_deps()
|
||
|
third_party_deps()
|