From 1514dd40257720e1f2d4fd65000c0d2e5ca7d02c Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Mon, 11 May 2020 08:42:41 -0700 Subject: [PATCH] Internal change only. PiperOrigin-RevId: 310919530 Change-Id: I001957cc435c019c3611d728c8954cfe610ea6c8 --- tensorflow/core/BUILD | 4 ++-- tensorflow/core/platform/build_config.bzl | 2 ++ tensorflow/core/platform/default/build_config.bzl | 5 ++++- tensorflow/tensorflow.bzl | 4 ++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/tensorflow/core/BUILD b/tensorflow/core/BUILD index 28ef943f021..7f34bfaa186 100644 --- a/tensorflow/core/BUILD +++ b/tensorflow/core/BUILD @@ -112,6 +112,7 @@ load( "tf_kernel_tests_linkstatic", "tf_lib_proto_parsing_deps", "tf_portable_deps_no_runtime", + "tf_portable_proto_lib", "tf_proto_library", "tf_proto_library_cc", "tf_protos_all_impl", @@ -1378,10 +1379,9 @@ cc_library( ], visibility = ["//visibility:public"], deps = [ - ":protos_all_cc_impl", "//tensorflow/core/util:stats_calculator_portable", "//tensorflow/core:mobile_additional_lib_deps", - ] + tf_portable_deps_no_runtime(), + ] + tf_portable_proto_lib() + tf_portable_deps_no_runtime(), alwayslink = 1, ) diff --git a/tensorflow/core/platform/build_config.bzl b/tensorflow/core/platform/build_config.bzl index f0613cdc069..ab452562245 100644 --- a/tensorflow/core/platform/build_config.bzl +++ b/tensorflow/core/platform/build_config.bzl @@ -26,6 +26,7 @@ load( _tf_platform_alias = "tf_platform_alias", _tf_platform_deps = "tf_platform_deps", _tf_portable_deps_no_runtime = "tf_portable_deps_no_runtime", + _tf_portable_proto_lib = "tf_portable_proto_lib", _tf_proto_library = "tf_proto_library", _tf_proto_library_cc = "tf_proto_library_cc", _tf_proto_library_py = "tf_proto_library_py", @@ -65,6 +66,7 @@ tf_lib_proto_parsing_deps = _tf_lib_proto_parsing_deps tf_logging_deps = _tf_logging_deps tf_platform_alias = _tf_platform_alias tf_platform_deps = _tf_platform_deps +tf_portable_proto_lib = _tf_portable_proto_lib tf_portable_deps_no_runtime = _tf_portable_deps_no_runtime tf_proto_library = _tf_proto_library tf_proto_library_cc = _tf_proto_library_cc diff --git a/tensorflow/core/platform/default/build_config.bzl b/tensorflow/core/platform/default/build_config.bzl index 18a8285ece1..fd6e78addce 100644 --- a/tensorflow/core/platform/default/build_config.bzl +++ b/tensorflow/core/platform/default/build_config.bzl @@ -727,6 +727,9 @@ def tf_protobuf_deps(): otherwise = [clean_dep("@com_google_protobuf//:protobuf_headers")], ) +def tf_portable_proto_lib(): + return ["//tensorflow/core:protos_all_cc_impl"] + def tf_protobuf_compiler_deps(): return if_static( [ @@ -764,7 +767,7 @@ def tf_portable_deps_no_runtime(): "@nsync//:nsync_cpp", "@com_googlesource_code_re2//:re2", "@farmhash_archive//:farmhash", - ] + tf_protobuf_deps() + ] def tf_google_mobile_srcs_no_runtime(): return [] diff --git a/tensorflow/tensorflow.bzl b/tensorflow/tensorflow.bzl index 61d6656ec80..f56330b428a 100644 --- a/tensorflow/tensorflow.bzl +++ b/tensorflow/tensorflow.bzl @@ -193,10 +193,10 @@ def if_macos(a, otherwise = []): "//conditions:default": otherwise, }) -def if_ios(a): +def if_ios(a, otherwise = []): return select({ clean_dep("//tensorflow:ios"): a, - "//conditions:default": [], + "//conditions:default": otherwise, }) def if_ios_x86_64(a):