Migrate --incompatible_remap_main_repo for bazel 2.0
Bazel 2.0 flipped --incompatible_remap_main_repo. The gist of it is that when referring to a target in the main repository from inside an external repository the target needs to be prefixed by the main repository name. In this case "@org_tensorflow". Else, it's assumed that one is referring to a target inside the external repo. PiperOrigin-RevId: 294752795 Change-Id: Ic23d08f457b966e9a039152c5f8a550ba5a1978e
This commit is contained in:
parent
356e90472b
commit
f99aebca5d
2
.bazelrc
2
.bazelrc
|
@ -225,8 +225,6 @@ build --noincompatible_remove_legacy_whole_archive
|
|||
# These are bazel 2.0's incompatible flags. Tensorflow needs to use bazel 2.0.0
|
||||
# to use cc_shared_library, as part of the Tensorflow Build Improvements RFC:
|
||||
# https://github.com/tensorflow/community/pull/179
|
||||
build --noincompatible_remap_main_repo
|
||||
query --noincompatible_remap_main_repo
|
||||
build --noincompatible_prohibit_aapt1
|
||||
|
||||
# Modular TF build options
|
||||
|
|
|
@ -116,6 +116,7 @@ tensorflow/third_party/mkl/MKL_LICENSE
|
|||
tensorflow/third_party/mkl/build_defs.bzl
|
||||
tensorflow/third_party/mkl/mkl.BUILD
|
||||
tensorflow/third_party/mkl_dnn/LICENSE
|
||||
tensorflow/third_party/mkl_dnn/build_defs.bzl
|
||||
tensorflow/third_party/mkl_dnn/mkldnn.BUILD
|
||||
tensorflow/third_party/mpi/.gitignore
|
||||
tensorflow/third_party/nanopb.BUILD
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
licenses(["notice"])
|
||||
|
||||
py_binary(
|
||||
name = "expand_cmake_vars",
|
||||
srcs = ["expand_cmake_vars.py"],
|
||||
|
|
|
@ -25,7 +25,7 @@ def if_mkl(if_true, if_false = []):
|
|||
a select evaluating to either if_true or if_false as appropriate.
|
||||
"""
|
||||
return select({
|
||||
str(Label("//third_party/mkl:build_with_mkl")): if_true,
|
||||
"@org_tensorflow//third_party/mkl:build_with_mkl": if_true,
|
||||
"//conditions:default": if_false,
|
||||
})
|
||||
|
||||
|
@ -41,8 +41,8 @@ def if_mkl_ml(if_true, if_false = []):
|
|||
a select evaluating to either if_true or if_false as appropriate.
|
||||
"""
|
||||
return select({
|
||||
str(Label("//third_party/mkl_dnn:build_with_mkl_dnn_only")): if_false,
|
||||
str(Label("//third_party/mkl:build_with_mkl")): if_true,
|
||||
"@org_tensorflow//third_party/mkl_dnn:build_with_mkl_dnn_only": if_false,
|
||||
"@org_tensorflow//third_party/mkl:build_with_mkl": if_true,
|
||||
"//conditions:default": if_false,
|
||||
})
|
||||
|
||||
|
@ -57,7 +57,7 @@ def if_mkl_ml_only(if_true, if_false = []):
|
|||
a select evaluating to either if_true or if_false as appropriate.
|
||||
"""
|
||||
return select({
|
||||
str(Label("//third_party/mkl:build_with_mkl_ml_only")): if_true,
|
||||
"@org_tensorflow//third_party/mkl:build_with_mkl_ml_only": if_true,
|
||||
"//conditions:default": if_false,
|
||||
})
|
||||
|
||||
|
@ -74,7 +74,7 @@ def if_mkl_lnx_x64(if_true, if_false = []):
|
|||
a select evaluating to either if_true or if_false as appropriate.
|
||||
"""
|
||||
return select({
|
||||
str(Label("//third_party/mkl:build_with_mkl_lnx_x64")): if_true,
|
||||
"@org_tensorflow//third_party/mkl:build_with_mkl_lnx_x64": if_true,
|
||||
"//conditions:default": if_false,
|
||||
})
|
||||
|
||||
|
@ -91,7 +91,7 @@ def if_enable_mkl(if_true, if_false = []):
|
|||
A select evaluating to either if_true or if_false as appropriate.
|
||||
"""
|
||||
return select({
|
||||
str(Label("//third_party/mkl:enable_mkl")): if_true,
|
||||
"@org_tensorflow//third_party/mkl:enable_mkl": if_true,
|
||||
"//conditions:default": if_false,
|
||||
})
|
||||
|
||||
|
@ -105,11 +105,11 @@ def mkl_deps():
|
|||
inclusion in the deps attribute of rules.
|
||||
"""
|
||||
return select({
|
||||
str(Label("//third_party/mkl_dnn:build_with_mkl_dnn_only")): ["@mkl_dnn"],
|
||||
str(Label("//third_party/mkl_dnn:build_with_mkl_dnn_v1_only")): ["@mkl_dnn_v1//:mkl_dnn"],
|
||||
str(Label("//third_party/mkl:build_with_mkl_ml_only")): ["//third_party/mkl:intel_binary_blob"],
|
||||
str(Label("//third_party/mkl:build_with_mkl")): [
|
||||
"//third_party/mkl:intel_binary_blob",
|
||||
"@org_tensorflow//third_party/mkl_dnn:build_with_mkl_dnn_only": ["@mkl_dnn"],
|
||||
"@org_tensorflow//third_party/mkl_dnn:build_with_mkl_dnn_v1_only": ["@mkl_dnn_v1//:mkl_dnn"],
|
||||
"@org_tensorflow//third_party/mkl:build_with_mkl_ml_only": ["@org_tensorflow//third_party/mkl:intel_binary_blob"],
|
||||
"@org_tensorflow//third_party/mkl:build_with_mkl": [
|
||||
"@org_tensorflow//third_party/mkl:intel_binary_blob",
|
||||
"@mkl_dnn",
|
||||
],
|
||||
"//conditions:default": [],
|
||||
|
|
|
@ -10,7 +10,7 @@ def if_mkl_open_source_only(if_true, if_false = []):
|
|||
|
||||
"""
|
||||
return select({
|
||||
str(Label("//third_party/mkl_dnn:build_with_mkl_dnn_only")): if_true,
|
||||
"@org_tensorflow//third_party/mkl_dnn:build_with_mkl_dnn_only": if_true,
|
||||
"//conditions:default": if_false,
|
||||
})
|
||||
|
||||
|
@ -26,6 +26,6 @@ def if_mkl_v1_open_source_only(if_true, if_false = []):
|
|||
|
||||
"""
|
||||
return select({
|
||||
str(Label("//third_party/mkl_dnn:build_with_mkl_dnn_v1_only")): if_true,
|
||||
"@org_tensorflow//third_party/mkl_dnn:build_with_mkl_dnn_v1_only": if_true,
|
||||
"//conditions:default": if_false,
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue