Bazel dependency fix of the llvm and jemalloc packages that cause issues when TensorFlow is linked as a submodule.
Change: 144764356
This commit is contained in:
parent
a6d9d130f5
commit
97d4863c34
@ -315,7 +315,7 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""):
|
||||
|
||||
# TODO(phawkins): currently, this rule uses an unofficial LLVM mirror.
|
||||
# Switch to an official source of snapshots if/when possible.
|
||||
native.new_http_archive(
|
||||
temp_workaround_http_archive(
|
||||
name = "llvm",
|
||||
urls = [
|
||||
"http://bazel-mirror.storage.googleapis.com/github.com/llvm-mirror/llvm/archive/4e9e4f277ad254e02a0cff33c61cd827e600da62.tar.gz",
|
||||
@ -324,6 +324,7 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""):
|
||||
sha256 = "ec67c57dfd85c2bb857fd13011c5c2aa3f1dc9f40c0a5bac13e78e76d6b61aa6",
|
||||
strip_prefix = "llvm-4e9e4f277ad254e02a0cff33c61cd827e600da62",
|
||||
build_file = str(Label("//third_party/llvm:llvm.BUILD")),
|
||||
repository = tf_repo_name,
|
||||
)
|
||||
|
||||
native.new_http_archive(
|
||||
@ -396,7 +397,7 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""):
|
||||
actual = "@junit_jar//jar",
|
||||
)
|
||||
|
||||
native.new_http_archive(
|
||||
temp_workaround_http_archive(
|
||||
name = "jemalloc",
|
||||
urls = [
|
||||
"http://bazel-mirror.storage.googleapis.com/github.com/jemalloc/jemalloc/archive/4.4.0.tar.gz",
|
||||
@ -405,4 +406,5 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""):
|
||||
sha256 = "3c8f25c02e806c3ce0ab5fb7da1817f89fc9732709024e2a81b6b82f7cc792a8",
|
||||
strip_prefix = "jemalloc-4.4.0",
|
||||
build_file = str(Label("//third_party:jemalloc.BUILD")),
|
||||
repository = tf_repo_name,
|
||||
)
|
||||
|
2
third_party/jemalloc.BUILD
vendored
2
third_party/jemalloc.BUILD
vendored
@ -5,7 +5,7 @@ licenses(["notice"]) # BSD
|
||||
|
||||
exports_files(["COPYING"])
|
||||
|
||||
load("@//third_party:common.bzl", "template_rule")
|
||||
load("@%ws%//third_party:common.bzl", "template_rule")
|
||||
|
||||
cc_library(
|
||||
name = "jemalloc",
|
||||
|
8
third_party/llvm/llvm.BUILD
vendored
8
third_party/llvm/llvm.BUILD
vendored
@ -7,18 +7,18 @@ licenses(["notice"])
|
||||
exports_files(["LICENSE.TXT"])
|
||||
|
||||
load(
|
||||
"@//third_party/llvm:llvm.bzl",
|
||||
"@%ws%//third_party/llvm:llvm.bzl",
|
||||
"gentbl",
|
||||
"expand_cmake_vars",
|
||||
"llvm_target_cmake_vars",
|
||||
"cmake_var_string",
|
||||
)
|
||||
load(
|
||||
"@//third_party:common.bzl",
|
||||
"@%ws%//third_party:common.bzl",
|
||||
"template_rule",
|
||||
)
|
||||
|
||||
package(default_visibility = ["@//tensorflow/compiler/xla:internal"])
|
||||
package(default_visibility = ["@%ws%//tensorflow/compiler/xla:internal"])
|
||||
|
||||
llvm_host_triple = "x86_64-unknown-linux_gnu"
|
||||
|
||||
@ -147,7 +147,7 @@ darwin_cmake_vars = {
|
||||
# TODO(phawkins): use a better method to select the right host triple, rather
|
||||
# than hardcoding x86_64.
|
||||
all_cmake_vars = select({
|
||||
"@//tensorflow:darwin": cmake_var_string(
|
||||
"@%ws%//tensorflow:darwin": cmake_var_string(
|
||||
cmake_vars + llvm_target_cmake_vars("X86", "x86_64-apple-darwin") +
|
||||
darwin_cmake_vars,
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user