Cleanup usage of the protobuf workspace. See #19032

PiperOrigin-RevId: 254021621
This commit is contained in:
Mihai Maruseac 2019-06-19 10:22:59 -07:00 committed by TensorFlower Gardener
parent 742c4b2c91
commit 338c2f269b
36 changed files with 88 additions and 117 deletions

View File

@ -416,7 +416,7 @@ cc_library(
"//tensorflow/core:lib_proto_parsing", "//tensorflow/core:lib_proto_parsing",
"//tensorflow/core:protos_all_cc", "//tensorflow/core:protos_all_cc",
"@com_google_absl//absl/strings", "@com_google_absl//absl/strings",
"@protobuf_archive//:protobuf_headers", "@com_google_protobuf//:protobuf_headers",
], ],
) )

View File

@ -67,8 +67,8 @@ cc_library(
srcs = ["platform_id.cc"], srcs = ["platform_id.cc"],
hdrs = ["platform_id.h"], hdrs = ["platform_id.h"],
deps = ["//tensorflow/core:stream_executor_headers_lib"] + if_static( deps = ["//tensorflow/core:stream_executor_headers_lib"] + if_static(
["@protobuf_archive//:protobuf"], ["@com_google_protobuf//:protobuf"],
["@protobuf_archive//:protobuf_headers"], ["@com_google_protobuf//:protobuf_headers"],
), ),
) )

View File

@ -22,12 +22,12 @@ def xla_proto_library(name, srcs = [], deps = [], visibility = None, testonly =
srcs = srcs, srcs = srcs,
# Append well-known proto dep. As far as I know this is the only way # Append well-known proto dep. As far as I know this is the only way
# for xla_proto_library to access google.protobuf.{Any,Duration,...}. # for xla_proto_library to access google.protobuf.{Any,Duration,...}.
deps = deps + ["@protobuf_archive//:cc_wkt_protos"], deps = deps + ["@com_google_protobuf//:cc_wkt_protos"],
cc_libs = if_static( cc_libs = if_static(
["@protobuf_archive//:protobuf"], ["@com_google_protobuf//:protobuf"],
otherwise = ["@protobuf_archive//:protobuf_headers"], otherwise = ["@com_google_protobuf//:protobuf_headers"],
), ),
protoc = "@protobuf_archive//:protoc", protoc = "@com_google_protobuf//:protoc",
testonly = testonly, testonly = testonly,
visibility = visibility, visibility = visibility,
**kwargs **kwargs

View File

@ -12,7 +12,7 @@ cc_library(
deps = [ deps = [
":masked_matmul_ops", ":masked_matmul_ops",
":wals_solver_ops", ":wals_solver_ops",
"@protobuf_archive//:protobuf_headers", "@com_google_protobuf//:protobuf_headers",
], ],
) )
@ -22,7 +22,7 @@ cc_library(
deps = [ deps = [
"//tensorflow/core:framework_headers_lib", "//tensorflow/core:framework_headers_lib",
"//third_party/eigen3", "//third_party/eigen3",
"@protobuf_archive//:protobuf_headers", "@com_google_protobuf//:protobuf_headers",
], ],
alwayslink = 1, alwayslink = 1,
) )
@ -34,7 +34,7 @@ cc_library(
"//tensorflow/core:framework_headers_lib", "//tensorflow/core:framework_headers_lib",
"//tensorflow/core/kernels:bounds_check", "//tensorflow/core/kernels:bounds_check",
"//third_party/eigen3", "//third_party/eigen3",
"@protobuf_archive//:protobuf_headers", "@com_google_protobuf//:protobuf_headers",
], ],
alwayslink = 1, alwayslink = 1,
) )

View File

@ -21,7 +21,7 @@ cc_library(
deps = [ deps = [
"//tensorflow/core:framework_headers_lib", "//tensorflow/core:framework_headers_lib",
"//third_party/eigen3", "//third_party/eigen3",
"@protobuf_archive//:protobuf_headers", "@com_google_protobuf//:protobuf_headers",
], ],
) )

View File

@ -47,7 +47,7 @@ cc_library(
deps = [ deps = [
"//tensorflow/core:framework_headers_lib", "//tensorflow/core:framework_headers_lib",
"//third_party/eigen3", "//third_party/eigen3",
"@protobuf_archive//:protobuf_headers", "@com_google_protobuf//:protobuf_headers",
], ],
alwayslink = 1, alwayslink = 1,
) )

View File

@ -67,7 +67,7 @@ cc_library(
deps = [ deps = [
"//tensorflow/core:framework_headers_lib", "//tensorflow/core:framework_headers_lib",
"@boringssl//:ssl", "@boringssl//:ssl",
"@protobuf_archive//:protobuf_headers", "@com_google_protobuf//:protobuf_headers",
], ],
) )
@ -86,7 +86,7 @@ cc_library(
":ignite_client", ":ignite_client",
"//tensorflow/core:framework_headers_lib", "//tensorflow/core:framework_headers_lib",
"//third_party/eigen3", "//third_party/eigen3",
"@protobuf_archive//:protobuf_headers", "@com_google_protobuf//:protobuf_headers",
], ],
alwayslink = 1, alwayslink = 1,
) )

View File

@ -354,7 +354,7 @@ tf_custom_op_library(
"ops/single_image_random_dot_stereograms_ops.cc", "ops/single_image_random_dot_stereograms_ops.cc",
], ],
deps = [ deps = [
"@protobuf_archive//:protobuf", "@com_google_protobuf//:protobuf",
], ],
) )

View File

@ -14,7 +14,7 @@ cc_library(
deps = [ deps = [
"//tensorflow/core:framework_headers_lib", "//tensorflow/core:framework_headers_lib",
"//third_party/eigen3", "//third_party/eigen3",
"@protobuf_archive//:protobuf_headers", "@com_google_protobuf//:protobuf_headers",
], ],
alwayslink = 1, alwayslink = 1,
) )

View File

@ -39,8 +39,8 @@ cc_library(
deps = [ deps = [
"//tensorflow/core:framework_headers_lib", "//tensorflow/core:framework_headers_lib",
"//third_party/eigen3", "//third_party/eigen3",
"@com_google_protobuf//:protobuf_headers",
"@kafka", "@kafka",
"@protobuf_archive//:protobuf_headers",
], ],
alwayslink = 1, alwayslink = 1,
) )

View File

@ -43,7 +43,7 @@ cc_library(
"//tensorflow/core/platform/s3:aws_crypto", "//tensorflow/core/platform/s3:aws_crypto",
"//third_party/eigen3", "//third_party/eigen3",
"@aws", "@aws",
"@protobuf_archive//:protobuf_headers", "@com_google_protobuf//:protobuf_headers",
], ],
alwayslink = 1, alwayslink = 1,
) )

View File

@ -14,8 +14,8 @@ cc_library(
deps = [ deps = [
"//tensorflow/core:framework_headers_lib", "//tensorflow/core:framework_headers_lib",
"//third_party/eigen3", "//third_party/eigen3",
"@com_google_protobuf//:protobuf_headers",
"@farmhash_archive//:farmhash", "@farmhash_archive//:farmhash",
"@protobuf_archive//:protobuf_headers",
], ],
alwayslink = 1, alwayslink = 1,
) )

View File

@ -22,7 +22,7 @@ cc_library(
deps = [ deps = [
"//tensorflow/core:framework_headers_lib", "//tensorflow/core:framework_headers_lib",
"//third_party/eigen3", "//third_party/eigen3",
"@protobuf_archive//:protobuf_headers", "@com_google_protobuf//:protobuf_headers",
], ],
alwayslink = 1, alwayslink = 1,
) )

View File

@ -43,7 +43,7 @@ cc_library(
":tree_utils", ":tree_utils",
"//tensorflow/core:framework_headers_lib", "//tensorflow/core:framework_headers_lib",
"//third_party/eigen3", "//third_party/eigen3",
"@protobuf_archive//:protobuf_headers", "@com_google_protobuf//:protobuf_headers",
], ],
alwayslink = 1, alwayslink = 1,
) )
@ -388,7 +388,7 @@ cc_library(
deps = [ deps = [
"//tensorflow/core:framework_headers_lib", "//tensorflow/core:framework_headers_lib",
"//third_party/eigen3", "//third_party/eigen3",
"@protobuf_archive//:protobuf_headers", "@com_google_protobuf//:protobuf_headers",
], ],
) )
@ -412,7 +412,7 @@ tf_cc_shared_object(
deps = [ deps = [
":forest_proto_impl", ":forest_proto_impl",
"//tensorflow/contrib/tensor_forest/kernels/v4:decision-tree-resource_impl", "//tensorflow/contrib/tensor_forest/kernels/v4:decision-tree-resource_impl",
"@protobuf_archive//:protobuf", "@com_google_protobuf//:protobuf",
], ],
) )

View File

@ -77,7 +77,7 @@ cc_library(
deps = [ deps = [
"//tensorflow/core:framework_headers_lib", "//tensorflow/core:framework_headers_lib",
"//third_party/eigen3", "//third_party/eigen3",
"@protobuf_archive//:protobuf_headers", "@com_google_protobuf//:protobuf_headers",
], ],
) )

View File

@ -455,7 +455,7 @@ cc_library(
":platform_base", ":platform_base",
":platform_port", ":platform_port",
"//tensorflow/core/platform/default/build_config:protobuf", "//tensorflow/core/platform/default/build_config:protobuf",
"@protobuf_archive//:protobuf", "@com_google_protobuf//:protobuf",
], ],
) )
@ -1928,10 +1928,10 @@ cc_library(
":protos_all_cc_impl", ":protos_all_cc_impl",
":stats_calculator_portable", ":stats_calculator_portable",
"//third_party/eigen3", "//third_party/eigen3",
"@com_google_protobuf//:protobuf",
"@double_conversion//:double-conversion", "@double_conversion//:double-conversion",
"@farmhash_archive//:farmhash", "@farmhash_archive//:farmhash",
"@nsync//:nsync_cpp", "@nsync//:nsync_cpp",
"@protobuf_archive//:protobuf",
], ],
alwayslink = 1, alwayslink = 1,
) )
@ -1953,10 +1953,10 @@ cc_library(
":protos_all_cc_impl", ":protos_all_cc_impl",
":stats_calculator_portable", ":stats_calculator_portable",
"//third_party/eigen3", "//third_party/eigen3",
"@com_google_protobuf//:protobuf",
"@double_conversion//:double-conversion", "@double_conversion//:double-conversion",
"@farmhash_archive//:farmhash", "@farmhash_archive//:farmhash",
"@nsync//:nsync_cpp", "@nsync//:nsync_cpp",
"@protobuf_archive//:protobuf",
], ],
alwayslink = 1, alwayslink = 1,
) )
@ -2012,9 +2012,9 @@ cc_library(
":protos_all_cc_impl", ":protos_all_cc_impl",
"//third_party/eigen3", "//third_party/eigen3",
"//third_party/fft2d:fft2d_headers", "//third_party/fft2d:fft2d_headers",
"@com_google_protobuf//:protobuf",
"@fft2d", "@fft2d",
"@gemmlowp", "@gemmlowp",
"@protobuf_archive//:protobuf",
], ],
alwayslink = 1, alwayslink = 1,
) )
@ -2029,10 +2029,10 @@ cc_library(
":protos_all_cc_impl", ":protos_all_cc_impl",
":stats_calculator_portable", ":stats_calculator_portable",
"//third_party/eigen3", "//third_party/eigen3",
"@com_google_protobuf//:protobuf",
"@double_conversion//:double-conversion", "@double_conversion//:double-conversion",
"@farmhash_archive//:farmhash", "@farmhash_archive//:farmhash",
"@nsync//:nsync_cpp", "@nsync//:nsync_cpp",
"@protobuf_archive//:protobuf",
], ],
alwayslink = 1, alwayslink = 1,
) )
@ -2071,7 +2071,7 @@ cc_library(
":protos_all_cc_impl", ":protos_all_cc_impl",
"//tensorflow/core/kernels:android_tensorflow_kernels", "//tensorflow/core/kernels:android_tensorflow_kernels",
"//third_party/eigen3", "//third_party/eigen3",
"@protobuf_archive//:protobuf", "@com_google_protobuf//:protobuf",
], ],
alwayslink = 1, alwayslink = 1,
) )
@ -2549,7 +2549,7 @@ cc_library(
"@snappy", "@snappy",
"@zlib_archive//:zlib", "@zlib_archive//:zlib",
"@double_conversion//:double-conversion", "@double_conversion//:double-conversion",
"@protobuf_archive//:protobuf", "@com_google_protobuf//:protobuf",
] + tf_protos_all_impl() + tf_protos_grappler_impl() + ] + tf_protos_all_impl() + tf_protos_grappler_impl() +
tf_additional_numa_deps(), tf_additional_numa_deps(),
) )
@ -2878,10 +2878,10 @@ tf_cuda_library(
] + if_static( ] + if_static(
extra_deps = [ extra_deps = [
":framework_internal_impl", ":framework_internal_impl",
"@protobuf_archive//:protobuf", "@com_google_protobuf//:protobuf",
], ],
otherwise = [ otherwise = [
"@protobuf_archive//:protobuf_headers", "@com_google_protobuf//:protobuf_headers",
], ],
), ),
alwayslink = 1, alwayslink = 1,
@ -2985,8 +2985,8 @@ tf_cuda_library(
"//tensorflow/core/profiler/lib:traceme", "//tensorflow/core/profiler/lib:traceme",
"//third_party/eigen3", "//third_party/eigen3",
] + if_static( ] + if_static(
extra_deps = ["@protobuf_archive//:protobuf"], extra_deps = ["@com_google_protobuf//:protobuf"],
otherwise = ["@protobuf_archive//:protobuf_headers"], otherwise = ["@com_google_protobuf//:protobuf_headers"],
) + mkl_deps(), ) + mkl_deps(),
alwayslink = 1, alwayslink = 1,
) )
@ -5561,7 +5561,7 @@ tf_portable_proto_library(
prefix_dir = "emscripten_proto_no_rtti", prefix_dir = "emscripten_proto_no_rtti",
proto_deps = [ proto_deps = [
":protos_all_cc", ":protos_all_cc",
"@protobuf_archive//:protobuf", "@com_google_protobuf//:protobuf",
], ],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )

View File

@ -6479,9 +6479,9 @@ cc_library(
"//tensorflow/core:protos_all_cc_impl", "//tensorflow/core:protos_all_cc_impl",
"//third_party/eigen3", "//third_party/eigen3",
"//third_party/fft2d:fft2d_headers", "//third_party/fft2d:fft2d_headers",
"@com_google_protobuf//:protobuf",
"@fft2d", "@fft2d",
"@gemmlowp", "@gemmlowp",
"@protobuf_archive//:protobuf",
], ],
alwayslink = 1, alwayslink = 1,
) )

View File

@ -1,6 +1,6 @@
# Platform-specific build configurations. # Platform-specific build configurations.
load("@protobuf_archive//:protobuf.bzl", "proto_gen") load("@com_google_protobuf//:protobuf.bzl", "proto_gen")
load("//tensorflow:tensorflow.bzl", "if_not_mobile") load("//tensorflow:tensorflow.bzl", "if_not_mobile")
load("//tensorflow:tensorflow.bzl", "if_windows") load("//tensorflow:tensorflow.bzl", "if_windows")
load("//tensorflow:tensorflow.bzl", "if_not_windows") load("//tensorflow:tensorflow.bzl", "if_not_windows")
@ -132,7 +132,7 @@ def cc_proto_library(
deps = [], deps = [],
cc_libs = [], cc_libs = [],
include = None, include = None,
protoc = "@protobuf_archive//:protoc", protoc = "@com_google_protobuf//:protoc",
internal_bootstrap_hack = False, internal_bootstrap_hack = False,
use_grpc_plugin = False, use_grpc_plugin = False,
use_grpc_namespace = False, use_grpc_namespace = False,
@ -232,7 +232,7 @@ def cc_proto_library(
) )
native.cc_library( native.cc_library(
name = header_only_name, name = header_only_name,
deps = ["@protobuf_archive//:protobuf_headers"] + if_static([impl_name]), deps = ["@com_google_protobuf//:protobuf_headers"] + if_static([impl_name]),
hdrs = gen_hdrs, hdrs = gen_hdrs,
**kargs **kargs
) )
@ -249,8 +249,8 @@ def py_proto_library(
py_libs = [], py_libs = [],
py_extra_srcs = [], py_extra_srcs = [],
include = None, include = None,
default_runtime = "@protobuf_archive//:protobuf_python", default_runtime = "@com_google_protobuf//:protobuf_python",
protoc = "@protobuf_archive//:protoc", protoc = "@com_google_protobuf//:protoc",
use_grpc_plugin = False, use_grpc_plugin = False,
**kargs): **kargs):
"""Bazel rule to create a Python protobuf library from proto source files """Bazel rule to create a Python protobuf library from proto source files
@ -345,19 +345,19 @@ def tf_proto_library_cc(
# libraries containing all the sources. # libraries containing all the sources.
proto_gen( proto_gen(
name = cc_name + "_genproto", name = cc_name + "_genproto",
protoc = "@protobuf_archive//:protoc", protoc = "@com_google_protobuf//:protoc",
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [s + "_genproto" for s in cc_deps], deps = [s + "_genproto" for s in cc_deps],
) )
native.cc_library( native.cc_library(
name = cc_name, name = cc_name,
deps = cc_deps + ["@protobuf_archive//:protobuf_headers"] + if_static([name + "_cc_impl"]), deps = cc_deps + ["@com_google_protobuf//:protobuf_headers"] + if_static([name + "_cc_impl"]),
testonly = testonly, testonly = testonly,
visibility = visibility, visibility = visibility,
) )
native.cc_library( native.cc_library(
name = cc_name + "_impl", name = cc_name + "_impl",
deps = [s + "_impl" for s in cc_deps] + ["@protobuf_archive//:cc_wkt_protos"], deps = [s + "_impl" for s in cc_deps] + ["@com_google_protobuf//:cc_wkt_protos"],
) )
return return
@ -367,8 +367,8 @@ def tf_proto_library_cc(
testonly = testonly, testonly = testonly,
srcs = srcs, srcs = srcs,
cc_libs = cc_libs + if_static( cc_libs = cc_libs + if_static(
["@protobuf_archive//:protobuf"], ["@com_google_protobuf//:protobuf"],
["@protobuf_archive//:protobuf_headers"], ["@com_google_protobuf//:protobuf_headers"],
), ),
copts = if_not_windows([ copts = if_not_windows([
"-Wno-unknown-warning-option", "-Wno-unknown-warning-option",
@ -376,10 +376,10 @@ def tf_proto_library_cc(
"-Wno-sign-compare", "-Wno-sign-compare",
]), ]),
make_default_target_header_only = make_default_target_header_only, make_default_target_header_only = make_default_target_header_only,
protoc = "@protobuf_archive//:protoc", protoc = "@com_google_protobuf//:protoc",
use_grpc_plugin = use_grpc_plugin, use_grpc_plugin = use_grpc_plugin,
visibility = visibility, visibility = visibility,
deps = cc_deps + ["@protobuf_archive//:cc_wkt_protos"], deps = cc_deps + ["@com_google_protobuf//:cc_wkt_protos"],
) )
def tf_proto_library_py( def tf_proto_library_py(
@ -398,13 +398,13 @@ def tf_proto_library_py(
# libraries containing all the sources. # libraries containing all the sources.
proto_gen( proto_gen(
name = py_name + "_genproto", name = py_name + "_genproto",
protoc = "@protobuf_archive//:protoc", protoc = "@com_google_protobuf//:protoc",
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [s + "_genproto" for s in py_deps], deps = [s + "_genproto" for s in py_deps],
) )
native.py_library( native.py_library(
name = py_name, name = py_name,
deps = py_deps + ["@protobuf_archive//:protobuf_python"], deps = py_deps + ["@com_google_protobuf//:protobuf_python"],
testonly = testonly, testonly = testonly,
visibility = visibility, visibility = visibility,
) )
@ -414,12 +414,12 @@ def tf_proto_library_py(
name = py_name, name = py_name,
testonly = testonly, testonly = testonly,
srcs = srcs, srcs = srcs,
default_runtime = "@protobuf_archive//:protobuf_python", default_runtime = "@com_google_protobuf//:protobuf_python",
protoc = "@protobuf_archive//:protoc", protoc = "@com_google_protobuf//:protoc",
srcs_version = srcs_version, srcs_version = srcs_version,
use_grpc_plugin = use_grpc_plugin, use_grpc_plugin = use_grpc_plugin,
visibility = visibility, visibility = visibility,
deps = deps + py_deps + ["@protobuf_archive//:protobuf_python"], deps = deps + py_deps + ["@com_google_protobuf//:protobuf_python"],
) )
def tf_jspb_proto_library(**kwargs): def tf_jspb_proto_library(**kwargs):
@ -730,7 +730,7 @@ def tf_lib_proto_parsing_deps():
def tf_lib_proto_compiler_deps(): def tf_lib_proto_compiler_deps():
return [ return [
"@protobuf_archive//:protoc_lib", "@com_google_protobuf//:protoc_lib",
] ]
def tf_additional_verbs_lib_defines(): def tf_additional_verbs_lib_defines():

View File

@ -34,8 +34,8 @@ tf_cc_binary(
deps = [ deps = [
"//tensorflow/core:framework_headers_lib", "//tensorflow/core:framework_headers_lib",
"@aws", "@aws",
"@com_google_protobuf//:protobuf_headers",
"@curl", "@curl",
"@protobuf_archive//:protobuf_headers",
], ],
) )

View File

@ -71,7 +71,7 @@ cc_library(
"//tensorflow/core:platform_base", "//tensorflow/core:platform_base",
"@com_google_absl//absl/strings", "@com_google_absl//absl/strings",
"@com_google_absl//absl/time", "@com_google_absl//absl/time",
"@protobuf_archive//:protobuf_headers", "@com_google_protobuf//:protobuf_headers",
], ],
) )

View File

@ -41,7 +41,7 @@ then
then then
echo "Protocol buffer compiler protoc not found in PATH or in ${PROTOC}" echo "Protocol buffer compiler protoc not found in PATH or in ${PROTOC}"
echo "Perhaps build it using:" echo "Perhaps build it using:"
echo "bazel build --config opt @protobuf_archive//:protoc" echo "bazel build --config opt @com_google_protobuf//:protoc"
exit 1 exit 1
fi fi
PROTOC=$PATH_PROTOC PROTOC=$PATH_PROTOC

View File

@ -167,7 +167,7 @@ cc_library(
], ],
deps = [ deps = [
# Placeholder for internal file dependency. # Placeholder for internal file dependency.
"@protobuf_archive//:protobuf_headers", "@com_google_protobuf//:protobuf_headers",
"//tensorflow/core:framework_lite", "//tensorflow/core:framework_lite",
"//tensorflow/core:lib", "//tensorflow/core:lib",
"//tensorflow/core:lib_internal", "//tensorflow/core:lib_internal",
@ -329,7 +329,7 @@ cc_library(
":toco_flags_proto_cc", ":toco_flags_proto_cc",
":toco_port", ":toco_port",
":tooling_util", ":tooling_util",
"@protobuf_archive//:protobuf_headers", "@com_google_protobuf//:protobuf_headers",
"@com_google_absl//absl/memory", "@com_google_absl//absl/memory",
"@com_google_absl//absl/strings", "@com_google_absl//absl/strings",
"//tensorflow/core:core_cpu_lib", "//tensorflow/core:core_cpu_lib",
@ -385,8 +385,8 @@ cc_library(
"//tensorflow/lite/kernels/internal:types", "//tensorflow/lite/kernels/internal:types",
"@com_google_absl//absl/memory", "@com_google_absl//absl/memory",
"@com_google_absl//absl/strings", "@com_google_absl//absl/strings",
"@com_google_protobuf//:protobuf_headers",
"@com_googlesource_code_re2//:re2", "@com_googlesource_code_re2//:re2",
"@protobuf_archive//:protobuf_headers",
], ],
) )

View File

@ -54,7 +54,7 @@ cc_library(
"//tensorflow/lite/toco:model", "//tensorflow/lite/toco:model",
"//tensorflow/lite/toco:toco_port", "//tensorflow/lite/toco:toco_port",
"//tensorflow/lite/toco:tooling_util", "//tensorflow/lite/toco:tooling_util",
"@protobuf_archive//:protobuf_headers", "@com_google_protobuf//:protobuf_headers",
], ],
) )

View File

@ -521,7 +521,7 @@ tf_cc_shared_object(
deps = [ deps = [
"//tensorflow/core:framework_headers_lib", "//tensorflow/core:framework_headers_lib",
"//third_party/eigen3", "//third_party/eigen3",
"@protobuf_archive//:protobuf_headers", "@com_google_protobuf//:protobuf_headers",
], ],
) )
@ -4413,8 +4413,8 @@ py_library(
deps = [ deps = [
"//tensorflow/tools/compatibility:all_renames_v2", "//tensorflow/tools/compatibility:all_renames_v2",
"//third_party/py/numpy", "//third_party/py/numpy",
"@com_google_protobuf//:protobuf_python",
"@org_python_pypi_backports_weakref", "@org_python_pypi_backports_weakref",
"@protobuf_archive//:protobuf_python",
"@six_archive//:six", "@six_archive//:six",
], ],
) )

View File

@ -111,7 +111,7 @@ py_library(
":proto_op_test_base", ":proto_op_test_base",
"//third_party/py/numpy", "//third_party/py/numpy",
"@absl_py//absl/testing:parameterized", "@absl_py//absl/testing:parameterized",
"@protobuf_archive//:protobuf_python", "@com_google_protobuf//:protobuf_python",
], ],
) )

View File

@ -1668,7 +1668,7 @@ def cc_header_only_library(name, deps = [], includes = [], extra_deps = [], **kw
def tf_custom_op_library_additional_deps(): def tf_custom_op_library_additional_deps():
return [ return [
"@protobuf_archive//:protobuf_headers", "@com_google_protobuf//:protobuf_headers",
clean_dep("//third_party/eigen3"), clean_dep("//third_party/eigen3"),
clean_dep("//tensorflow/core:framework_headers_lib"), clean_dep("//tensorflow/core:framework_headers_lib"),
] + if_windows(["//tensorflow/python:pywrap_tensorflow_import_lib"]) ] + if_windows(["//tensorflow/python:pywrap_tensorflow_import_lib"])
@ -1678,7 +1678,7 @@ def tf_custom_op_library_additional_deps():
# exporting symbols from _pywrap_tensorflow.dll on Windows. # exporting symbols from _pywrap_tensorflow.dll on Windows.
def tf_custom_op_library_additional_deps_impl(): def tf_custom_op_library_additional_deps_impl():
return [ return [
"@protobuf_archive//:protobuf", "@com_google_protobuf//:protobuf",
"@nsync//:nsync_cpp", "@nsync//:nsync_cpp",
# for //third_party/eigen3 # for //third_party/eigen3
clean_dep("//third_party/eigen3"), clean_dep("//third_party/eigen3"),

View File

@ -160,7 +160,7 @@ genrule(
"@nasm//:LICENSE", "@nasm//:LICENSE",
"@nsync//:LICENSE", "@nsync//:LICENSE",
"@png_archive//:LICENSE", "@png_archive//:LICENSE",
"@protobuf_archive//:LICENSE", "@com_google_protobuf//:LICENSE",
"@snappy//:COPYING", "@snappy//:COPYING",
"@zlib_archive//:zlib.h", "@zlib_archive//:zlib.h",
] + select({ ] + select({
@ -231,7 +231,7 @@ genrule(
"@nasm//:LICENSE", "@nasm//:LICENSE",
"@nsync//:LICENSE", "@nsync//:LICENSE",
"@png_archive//:LICENSE", "@png_archive//:LICENSE",
"@protobuf_archive//:LICENSE", "@com_google_protobuf//:LICENSE",
"@snappy//:COPYING", "@snappy//:COPYING",
"@zlib_archive//:zlib.h", "@zlib_archive//:zlib.h",
"@grpc//:LICENSE", "@grpc//:LICENSE",

View File

@ -186,7 +186,7 @@ filegroup(
"@pasta//:LICENSE", "@pasta//:LICENSE",
"@pcre//:LICENCE", "@pcre//:LICENCE",
"@png_archive//:LICENSE", "@png_archive//:LICENSE",
"@protobuf_archive//:LICENSE", "@com_google_protobuf//:LICENSE",
"@six_archive//:LICENSE", "@six_archive//:LICENSE",
"@snappy//:COPYING", "@snappy//:COPYING",
"@swig//:LICENSE", "@swig//:LICENSE",

View File

@ -60,8 +60,8 @@ function reorganize_includes() {
move_to_root_if_exists external/jsoncpp_git/include move_to_root_if_exists external/jsoncpp_git/include
rm -rf external/jsoncpp_git rm -rf external/jsoncpp_git
move_to_root_if_exists external/protobuf_archive/src/google move_to_root_if_exists external/com_google_protobuf/src/google
rm -rf external/protobuf_archive/python rm -rf external/com_google_protobuf/python
popd popd
} }

View File

@ -245,8 +245,8 @@ else:
headers = ( headers = (
list(find_files('*.h', 'tensorflow_core/core')) + list(find_files('*.h', 'tensorflow_core/core')) +
list(find_files('*.h', 'tensorflow_core/stream_executor')) + list(find_files('*.h', 'tensorflow_core/stream_executor')) +
list(find_files('*.h', 'google/protobuf_archive/src')) + list(find_files('*.h', 'google/com_google_protobuf/src')) +
list(find_files('*.inc', 'google/protobuf_archive/src')) + list(find_files('*.inc', 'google/com_google_protobuf/src')) +
list(find_files('*', 'third_party/eigen3')) + list( list(find_files('*', 'third_party/eigen3')) + list(
find_files('*.h', 'tensorflow_core/include/external/com_google_absl')) + find_files('*.h', 'tensorflow_core/include/external/com_google_absl')) +
list( list(

View File

@ -38,7 +38,7 @@ cc_binary(
visibility = ["//tensorflow:internal"], visibility = ["//tensorflow:internal"],
deps = [ deps = [
":gen_proto_text_functions_lib", ":gen_proto_text_functions_lib",
"@protobuf_archive//:protobuf", "@com_google_protobuf//:protobuf",
"//tensorflow/core:lib_proto_parsing", "//tensorflow/core:lib_proto_parsing",
"//tensorflow/core:lib_proto_compiler", "//tensorflow/core:lib_proto_compiler",
] + if_ios(["//tensorflow/core/platform/default/build_config:logging"]), ] + if_ios(["//tensorflow/core/platform/default/build_config:logging"]),

View File

@ -383,21 +383,6 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""):
# defined using bind for grpc. # defined using bind for grpc.
PROTOBUF_PATCH = "//third_party/protobuf:protobuf.patch" PROTOBUF_PATCH = "//third_party/protobuf:protobuf.patch"
tf_http_archive(
name = "protobuf_archive",
patch_file = PROTOBUF_PATCH,
sha256 = PROTOBUF_SHA256,
strip_prefix = PROTOBUF_STRIP_PREFIX,
system_build_file = clean_dep("//third_party/systemlibs:protobuf.BUILD"),
system_link_files = {
"//third_party/systemlibs:protobuf.bzl": "protobuf.bzl",
},
urls = PROTOBUF_URLS,
)
# We need to import the protobuf library under the names com_google_protobuf
# and com_google_protobuf_cc to enable proto_library support in bazel.
# Unfortunately there is no way to alias http_archives at the moment.
tf_http_archive( tf_http_archive(
name = "com_google_protobuf", name = "com_google_protobuf",
patch_file = PROTOBUF_PATCH, patch_file = PROTOBUF_PATCH,
@ -410,18 +395,6 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""):
urls = PROTOBUF_URLS, urls = PROTOBUF_URLS,
) )
tf_http_archive(
name = "com_google_protobuf_cc",
patch_file = PROTOBUF_PATCH,
sha256 = PROTOBUF_SHA256,
strip_prefix = PROTOBUF_STRIP_PREFIX,
system_build_file = clean_dep("//third_party/systemlibs:protobuf.BUILD"),
system_link_files = {
"//third_party/systemlibs:protobuf.bzl": "protobuf.bzl",
},
urls = PROTOBUF_URLS,
)
tf_http_archive( tf_http_archive(
name = "nsync", name = "nsync",
sha256 = "704be7f58afa47b99476bbac7aafd1a9db4357cef519db361716f13538547ffd", sha256 = "704be7f58afa47b99476bbac7aafd1a9db4357cef519db361716f13538547ffd",
@ -978,20 +951,20 @@ def tf_bind():
# Needed by gRPC # Needed by gRPC
native.bind( native.bind(
name = "protobuf", name = "protobuf",
actual = "@protobuf_archive//:protobuf", actual = "@com_google_protobuf//:protobuf",
) )
# gRPC expects //external:protobuf_clib and //external:protobuf_compiler # gRPC expects //external:protobuf_clib and //external:protobuf_compiler
# to point to Protobuf's compiler library. # to point to Protobuf's compiler library.
native.bind( native.bind(
name = "protobuf_clib", name = "protobuf_clib",
actual = "@protobuf_archive//:protoc_lib", actual = "@com_google_protobuf//:protoc_lib",
) )
# Needed by gRPC # Needed by gRPC
native.bind( native.bind(
name = "protobuf_headers", name = "protobuf_headers",
actual = "@protobuf_archive//:protobuf_headers", actual = "@com_google_protobuf//:protobuf_headers",
) )
# Needed by Protobuf # Needed by Protobuf

View File

@ -18,7 +18,7 @@ licenses(["notice"]) # Apache 2.0
exports_files(["LICENSE"]) exports_files(["LICENSE"])
load("@protobuf_archive//:protobuf.bzl", "cc_proto_library") load("@com_google_protobuf//:protobuf.bzl", "cc_proto_library")
cc_proto_library( cc_proto_library(
name = "bigtable_protos", name = "bigtable_protos",
@ -40,8 +40,8 @@ cc_proto_library(
"google/rpc/status.proto", "google/rpc/status.proto",
], ],
include = ".", include = ".",
default_runtime = "@protobuf_archive//:protobuf", default_runtime = "@com_google_protobuf//:protobuf",
protoc = "@protobuf_archive//:protoc", protoc = "@com_google_protobuf//:protoc",
use_grpc_plugin = True, use_grpc_plugin = True,
deps = ["@protobuf_archive//:cc_wkt_protos"], deps = ["@com_google_protobuf//:cc_wkt_protos"],
) )

View File

@ -4,15 +4,15 @@ package(
licenses(["notice"]) # MIT licenses(["notice"]) # MIT
load("@protobuf_archive//:protobuf.bzl", "py_proto_library") load("@com_google_protobuf//:protobuf.bzl", "py_proto_library")
exports_files(["pprof/LICENSE"]) exports_files(["pprof/LICENSE"])
py_proto_library( py_proto_library(
name = "pprof_proto_py", name = "pprof_proto_py",
srcs = ["proto/profile.proto"], srcs = ["proto/profile.proto"],
default_runtime = "@protobuf_archive//:protobuf_python", default_runtime = "@com_google_protobuf//:protobuf_python",
protoc = "@protobuf_archive//:protoc", protoc = "@com_google_protobuf//:protoc",
srcs_version = "PY2AND3", srcs_version = "PY2AND3",
deps = ["@protobuf_archive//:protobuf_python"], deps = ["@com_google_protobuf//:protobuf_python"],
) )

View File

@ -1,5 +1,5 @@
load( load(
"@protobuf_archive//:protobuf.bzl", "@com_google_protobuf//:protobuf.bzl",
"proto_gen", "proto_gen",
"py_proto_library", "py_proto_library",
"cc_proto_library", "cc_proto_library",
@ -93,7 +93,7 @@ cc_proto_library(
proto_gen( proto_gen(
name = "protobuf_python_genproto", name = "protobuf_python_genproto",
includes = ["."], includes = ["."],
protoc = "@protobuf_archive//:protoc", protoc = "@com_google_protobuf//:protoc",
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )

View File

@ -16,7 +16,6 @@ VALID_LIBS = [
"com_github_googleapis_googleapis", "com_github_googleapis_googleapis",
"com_github_googlecloudplatform_google_cloud_cpp", "com_github_googlecloudplatform_google_cloud_cpp",
"com_google_protobuf", "com_google_protobuf",
"com_google_protobuf_cc",
"com_googlesource_code_re2", "com_googlesource_code_re2",
"curl", "curl",
"cython", "cython",
@ -37,7 +36,6 @@ VALID_LIBS = [
"pasta", "pasta",
"pcre", "pcre",
"png_archive", "png_archive",
"protobuf_archive",
"six_archive", "six_archive",
"snappy", "snappy",
"swig", "swig",