Adding all non-test targets to tensorflow/core/lib/strings/BUILD, and wiring them into tensorflow/core/BUILD.

PiperOrigin-RevId: 276393828
Change-Id: I22b892c6027379ba403638571ea4b2475278ab33
This commit is contained in:
Brian Zhao 2019-10-23 18:22:58 -07:00 committed by TensorFlower Gardener
parent 06d8f77bcc
commit 9e1873d283
5 changed files with 84 additions and 38 deletions

View File

@ -443,6 +443,10 @@ filegroup(
"//tensorflow/core/platform:profile_utils/i_cpu_utils_helper.h",
"//tensorflow/core/platform:stacktrace.h",
"//tensorflow/core/platform:stacktrace_handler.h",
"//tensorflow/core/platform:stringpiece.h",
"//tensorflow/core/platform:stringprintf.h",
"//tensorflow/core/platform:strcat.h",
"//tensorflow/core/platform:str_util.h",
"//tensorflow/core/platform:strong_hash.h",
"//tensorflow/core/platform:subprocess.h",
] + tf_additional_monitoring_hdrs(),
@ -490,12 +494,15 @@ cc_library(
"//tensorflow/core/lib/core:errors",
"//tensorflow/core/lib/core:stringpiece",
"//tensorflow/core/lib/core:status",
"//tensorflow/core/lib/strings:numbers",
"//tensorflow/core/lib/strings:strcat",
"//tensorflow/core/platform:platform_port",
"//tensorflow/core/platform:logging",
"//tensorflow/core/platform:macros",
"//tensorflow/core/platform:protobuf",
"//tensorflow/core/platform:platform",
"//tensorflow/core/platform:stringpiece",
"//tensorflow/core/platform:tstring",
"//tensorflow/core/platform:types",
],
)
@ -2238,7 +2245,6 @@ cc_library(
"//tensorflow/core/platform:legacy_lib_internal_srcs",
"//tensorflow/core/lib/io:legacy_lib_internal_impl_srcs",
"//tensorflow/core/lib/random:legacy_lib_random_all_srcs",
"//tensorflow/core/lib/strings:legacy_lib_strings_all_srcs",
],
hdrs = LIB_INTERNAL_PUBLIC_HEADERS,
copts = tf_copts(),
@ -2287,6 +2293,15 @@ cc_library(
"//tensorflow/core/lib/io:proto_encode_helper",
"//tensorflow/core/lib/io:table_options",
"//tensorflow/core/lib/math:math_util",
"//tensorflow/core/lib/strings:base64",
"//tensorflow/core/lib/strings:numbers",
"//tensorflow/core/lib/strings:ordered_code",
"//tensorflow/core/lib/strings:proto_serialization",
"//tensorflow/core/lib/strings:proto_text_util",
"//tensorflow/core/lib/strings:scanner",
"//tensorflow/core/lib/strings:str_util",
"//tensorflow/core/lib/strings:strcat",
"//tensorflow/core/lib/strings:stringprintf",
"//tensorflow/core/platform:abi",
"//tensorflow/core/platform:annotation",
"//tensorflow/core/platform:context",
@ -2471,7 +2486,6 @@ cc_library(
srcs = if_android([
"lib/gif/gif_io.cc",
"//tensorflow/core/platform:gif.h",
"//tensorflow/core/lib/strings:legacy_lib_android_gif_internal_string_headers",
]),
hdrs = [
"lib/gif/gif_io.h",
@ -2491,6 +2505,8 @@ cc_library(
copts = tf_copts(),
linkopts = ["-ldl"],
deps = [
"//tensorflow/core/lib/strings:numbers",
"//tensorflow/core/lib/strings:strcat",
"//tensorflow/core/platform:dynamic_annotations",
"//tensorflow/core/platform:gif",
"//tensorflow/core/platform:numbers",

View File

@ -1,19 +1,30 @@
package(
default_visibility = [
"//tensorflow/core/lib/core:__pkg__",
"//tensorflow/core/lib/gtl:__pkg__",
"//tensorflow/core/lib/hash:__pkg__",
"//tensorflow/core/lib/io:__pkg__",
"//tensorflow/core/lib/random:__pkg__",
"//tensorflow/core/lib/strings:__pkg__",
"//tensorflow/core/platform:__pkg__",
# tensorflow/core:lib effectively exposes all targets under tensorflow/core/lib/**
"//tensorflow/core:__pkg__",
# tensorflow/core/platform still references some of the headers in this package
"//tensorflow/core/platform:__subpackages__",
],
licenses = ["notice"], # Apache 2.0
)
# Todo(bmzhao): Remaining targets to add to this BUILD file are:
# base64, proto_serialization, proto_text_util, and all tests.
# Note: proto_serialization depends on target lib/hash:hash being added.
# Todo(bmzhao): Remaining targets to add to this BUILD file are: all tests.
cc_library(
name = "base64",
srcs = ["base64.cc"],
hdrs = ["base64.h"],
deps = [
"//tensorflow/core/lib/core:errors",
"//tensorflow/core/lib/core:status",
],
)
cc_library(
name = "numbers",
hdrs = ["numbers.h"],
deps = ["//tensorflow/core/platform:numbers"],
)
cc_library(
name = "ordered_code",
@ -27,6 +38,36 @@ cc_library(
],
)
cc_library(
name = "proto_serialization",
srcs = ["proto_serialization.cc"],
hdrs = ["proto_serialization.h"],
deps = [
"//tensorflow/core/lib/gtl:inlined_vector",
"//tensorflow/core/lib/hash",
"//tensorflow/core/platform:logging",
"//tensorflow/core/platform:macros",
"//tensorflow/core/platform:protobuf",
"@com_google_absl//absl/memory",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "proto_text_util",
srcs = ["proto_text_util.cc"],
hdrs = ["proto_text_util.h"],
deps = [
"//tensorflow/core/platform:macros",
"//tensorflow/core/platform:numbers",
"//tensorflow/core/platform:protobuf",
"//tensorflow/core/platform:scanner",
"//tensorflow/core/platform:str_util",
"//tensorflow/core/platform:strcat",
"@com_google_absl//absl/strings",
],
)
cc_library(
name = "scanner",
hdrs = ["scanner.h"],
@ -34,17 +75,15 @@ cc_library(
)
cc_library(
name = "string_utils",
hdrs = [
"numbers.h",
"str_util.h",
"strcat.h",
],
deps = [
"//tensorflow/core/platform:numbers",
"//tensorflow/core/platform:str_util",
"//tensorflow/core/platform:strcat",
],
name = "str_util",
hdrs = ["str_util.h"],
deps = ["//tensorflow/core/platform:str_util"],
)
cc_library(
name = "strcat",
hdrs = ["strcat.h"],
deps = ["//tensorflow/core/platform:strcat"],
)
cc_library(
@ -123,15 +162,6 @@ filegroup(
visibility = ["//tensorflow/core:__pkg__"],
)
filegroup(
name = "legacy_lib_android_gif_internal_string_headers",
srcs = [
"numbers.h",
"strcat.h",
],
visibility = ["//tensorflow/core:__pkg__"],
)
filegroup(
name = "legacy_low_level_library_tests",
srcs = [

View File

@ -17,12 +17,12 @@ limitations under the License.
#define TENSORFLOW_CORE_LIB_STRINGS_PROTO_TEXT_UTIL_H_
#include "absl/strings/str_cat.h"
#include "tensorflow/core/lib/strings/numbers.h"
#include "tensorflow/core/lib/strings/scanner.h"
#include "tensorflow/core/lib/strings/str_util.h"
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/macros.h"
#include "tensorflow/core/platform/numbers.h"
#include "tensorflow/core/platform/protobuf.h"
#include "tensorflow/core/platform/scanner.h"
#include "tensorflow/core/platform/str_util.h"
#include "tensorflow/core/platform/strcat.h"
namespace tensorflow {
namespace strings {

View File

@ -310,11 +310,11 @@ TF_DEFAULT_PLATFORM_LIBRARIES = {
],
"deps": [
"@com_google_googletest//:gtest",
"//tensorflow/core/lib/strings:string_utils",
"//tensorflow/core/platform",
"//tensorflow/core/platform:logging",
"//tensorflow/core/platform:macros",
"//tensorflow/core/platform:net",
"//tensorflow/core/platform:strcat",
"//tensorflow/core/platform:types",
],
"tags": ["no_oss", "manual"],

View File

@ -17,9 +17,9 @@ limitations under the License.
#include <cstdlib>
#include "tensorflow/core/lib/strings/strcat.h"
#include "tensorflow/core/platform/logging.h"
#include "tensorflow/core/platform/net.h"
#include "tensorflow/core/platform/strcat.h"
#include "tensorflow/core/platform/types.h"
namespace tensorflow {