Upgrade bazel-toolchain to the latest release
Also removed bazel-toolchain support for Bazel version prior to 0.19.0 and updated check_bazel_version_at_least in WORKSPACE file To fix https://github.com/bazelbuild/bazel/issues/7113 PiperOrigin-RevId: 229392830
This commit is contained in:
parent
da47d5a9a6
commit
c223fbd116
@ -73,7 +73,7 @@ swift_rules_dependencies()
|
||||
# files, in case the parsing of those build files depends on the bazel
|
||||
# version we require here.
|
||||
load("//tensorflow:version_check.bzl", "check_bazel_version_at_least")
|
||||
check_bazel_version_at_least("0.18.0")
|
||||
check_bazel_version_at_least("0.19.0")
|
||||
|
||||
load("//tensorflow:workspace.bzl", "tf_workspace")
|
||||
|
||||
|
@ -2,26 +2,12 @@ load("//tensorflow:version_check.bzl", "parse_bazel_version")
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
|
||||
def bazel_toolchains_archive():
|
||||
# Not all bazel versions have set native.bazel_version - if it is not set,
|
||||
# fall back to the more compatible version of the toolchains archive.
|
||||
if native.bazel_version and parse_bazel_version(native.bazel_version) >= parse_bazel_version("0.19"):
|
||||
# This version of the toolchains repo is incompatible with older bazel
|
||||
# versions - we can remove this once TensorFlow drops support for bazel
|
||||
# before 0.19.
|
||||
http_archive(
|
||||
name = "bazel_toolchains",
|
||||
sha256 = "41c48a189be489e2d15dec40e0057ea15b95ee5b39cc2a7e6cf663e31432c75e",
|
||||
strip_prefix = "bazel-toolchains-3f8c58fe530fedc446de04673bc1e32985887dea",
|
||||
urls = [
|
||||
"https://github.com/nlopezgi/bazel-toolchains/archive/3f8c58fe530fedc446de04673bc1e32985887dea.tar.gz",
|
||||
],
|
||||
)
|
||||
else:
|
||||
http_archive(
|
||||
name = "bazel_toolchains",
|
||||
sha256 = "15b5858b1b5541ec44df31b94c3b8672815b31d71215a98398761ea9f4c4eedb",
|
||||
strip_prefix = "bazel-toolchains-6200b238c9c2d137c0d9a7262c80cc71d98e692b",
|
||||
urls = [
|
||||
"https://github.com/bazelbuild/bazel-toolchains/archive/6200b238c9c2d137c0d9a7262c80cc71d98e692b.tar.gz",
|
||||
],
|
||||
)
|
||||
http_archive(
|
||||
name = "bazel_toolchains",
|
||||
sha256 = "ee854b5de299138c1f4a2edb5573d22b21d975acfc7aa938f36d30b49ef97498",
|
||||
strip_prefix = "bazel-toolchains-37419a124bdb9af2fec5b99a973d359b6b899b61",
|
||||
urls = [
|
||||
"https://mirror.bazel.build/github.com/bazelbuild/bazel-toolchains/archive/37419a124bdb9af2fec5b99a973d359b6b899b61.tar.gz",
|
||||
"https://github.com/bazelbuild/bazel-toolchains/archive/37419a124bdb9af2fec5b99a973d359b6b899b61.tar.gz",
|
||||
],
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user