1load("//tensorflow:tensorflow.bzl", "filegroup") 2load("//tensorflow/core/platform:rules_cc.bzl", "cc_library") 3load("//tensorflow:tensorflow.bzl", "if_windows", "tf_cc_test") 4load("//tensorflow/stream_executor:build_defs.bzl", "stream_executor_friends") 5 6package( 7 default_visibility = [":friends"], 8 licenses = ["notice"], # Apache 2.0 9) 10 11package_group( 12 name = "friends", 13 packages = stream_executor_friends(), 14) 15 16filegroup( 17 name = "c_srcs", 18 data = glob([ 19 "**/*.cc", 20 "**/*.h", 21 ]), 22) 23 24cc_library( 25 name = "lib", 26 srcs = glob( 27 [ 28 "**/*.cc", 29 ], 30 exclude = [ 31 "**/*test*", 32 ], 33 ), 34 hdrs = glob(["**/*.h"]), 35 linkopts = if_windows(["-DEFAULTLIB:ws2_32.lib"]), 36 deps = [ 37 "//tensorflow/core:lib", 38 "//tensorflow/core:protos_all_cc", 39 "//tensorflow/stream_executor/platform", 40 "@com_google_absl//absl/strings", 41 "@com_google_absl//absl/strings:str_format", 42 "@com_google_absl//absl/types:span", 43 ], 44) 45 46tf_cc_test( 47 name = "statusor_test", 48 size = "small", 49 srcs = ["statusor_test.cc"], 50 deps = [ 51 ":lib", 52 "//tensorflow/core:lib", 53 "//tensorflow/core:test", 54 "//tensorflow/core:test_main", 55 ], 56) 57