From 7020d98a16125bbf5e7c0df2886f2d47feda862a Mon Sep 17 00:00:00 2001 From: Brian Zhao Date: Tue, 3 Sep 2019 21:15:17 -0700 Subject: [PATCH] Adding cord target to tensorflow/core/platform/BUILD. PiperOrigin-RevId: 267077308 --- tensorflow/core/platform/BUILD | 14 +++++++++++++- tensorflow/core/platform/cord.h | 2 ++ .../core/platform/default/build_refactor.bzl | 5 +++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/tensorflow/core/platform/BUILD b/tensorflow/core/platform/BUILD index c0d349ae365..6441f5f80b1 100644 --- a/tensorflow/core/platform/BUILD +++ b/tensorflow/core/platform/BUILD @@ -47,7 +47,10 @@ package( # exist to allow us incrementally add granular targets # to tf/core/platform/BUILD. We will remove these helpers, # after we finish refactoring tf/core/platform/BUILD. -tf_instantiate_platform_libraries(names = ["context"]) +tf_instantiate_platform_libraries(names = [ + "context", + "cord", +]) cc_library( name = "abi", @@ -84,6 +87,15 @@ cc_library( ], ) +cc_library( + name = "cord", + hdrs = ["cord.h"], + deps = [ + ":cord_impl", + ":platform", + ], +) + cc_library( name = "cpu_feature_guard", srcs = ["cpu_feature_guard.cc"], diff --git a/tensorflow/core/platform/cord.h b/tensorflow/core/platform/cord.h index 7c5c6655be3..4564eb3fdbe 100644 --- a/tensorflow/core/platform/cord.h +++ b/tensorflow/core/platform/cord.h @@ -16,6 +16,8 @@ limitations under the License. #ifndef TENSORFLOW_CORE_PLATFORM_CORD_H_ #define TENSORFLOW_CORE_PLATFORM_CORD_H_ +#include "tensorflow/core/platform/platform.h" + // Include appropriate platform-dependent implementations #if defined(PLATFORM_GOOGLE) #include "tensorflow/core/platform/google/cord.h" diff --git a/tensorflow/core/platform/default/build_refactor.bzl b/tensorflow/core/platform/default/build_refactor.bzl index 400a7ae0332..3007566d41a 100644 --- a/tensorflow/core/platform/default/build_refactor.bzl +++ b/tensorflow/core/platform/default/build_refactor.bzl @@ -17,6 +17,11 @@ TF_PLATFORM_LIBRARIES = { ], "visibility": ["//visibility:private"], }, + "cord": { + "name": "cord_impl", + "hdrs": ["//tensorflow/core/platform:default/cord.h"], + "visibility": ["//visibility:private"], + }, } def tf_instantiate_platform_libraries(names = []):