diff --git a/tensorflow/compiler/tf2tensorrt/BUILD b/tensorflow/compiler/tf2tensorrt/BUILD index 2fb5b8d529f..3c2e64229cc 100644 --- a/tensorflow/compiler/tf2tensorrt/BUILD +++ b/tensorflow/compiler/tf2tensorrt/BUILD @@ -416,7 +416,7 @@ cc_library( "//tensorflow/core:lib_proto_parsing", "//tensorflow/core:protos_all_cc", "@com_google_absl//absl/strings", - "@protobuf_archive//:protobuf_headers", + "@com_google_protobuf//:protobuf_headers", ], ) diff --git a/tensorflow/compiler/xla/service/interpreter/BUILD b/tensorflow/compiler/xla/service/interpreter/BUILD index feb3db64048..ae7ccadbf97 100644 --- a/tensorflow/compiler/xla/service/interpreter/BUILD +++ b/tensorflow/compiler/xla/service/interpreter/BUILD @@ -67,8 +67,8 @@ cc_library( srcs = ["platform_id.cc"], hdrs = ["platform_id.h"], deps = ["//tensorflow/core:stream_executor_headers_lib"] + if_static( - ["@protobuf_archive//:protobuf"], - ["@protobuf_archive//:protobuf_headers"], + ["@com_google_protobuf//:protobuf"], + ["@com_google_protobuf//:protobuf_headers"], ), ) diff --git a/tensorflow/compiler/xla/xla.bzl b/tensorflow/compiler/xla/xla.bzl index 16ef0caf29b..d91bc72c2f8 100644 --- a/tensorflow/compiler/xla/xla.bzl +++ b/tensorflow/compiler/xla/xla.bzl @@ -22,12 +22,12 @@ def xla_proto_library(name, srcs = [], deps = [], visibility = None, testonly = srcs = srcs, # 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,...}. - deps = deps + ["@protobuf_archive//:cc_wkt_protos"], + deps = deps + ["@com_google_protobuf//:cc_wkt_protos"], cc_libs = if_static( - ["@protobuf_archive//:protobuf"], - otherwise = ["@protobuf_archive//:protobuf_headers"], + ["@com_google_protobuf//:protobuf"], + otherwise = ["@com_google_protobuf//:protobuf_headers"], ), - protoc = "@protobuf_archive//:protoc", + protoc = "@com_google_protobuf//:protoc", testonly = testonly, visibility = visibility, **kwargs diff --git a/tensorflow/contrib/factorization/kernels/BUILD b/tensorflow/contrib/factorization/kernels/BUILD index e964b3fcdfd..60719db6570 100644 --- a/tensorflow/contrib/factorization/kernels/BUILD +++ b/tensorflow/contrib/factorization/kernels/BUILD @@ -12,7 +12,7 @@ cc_library( deps = [ ":masked_matmul_ops", ":wals_solver_ops", - "@protobuf_archive//:protobuf_headers", + "@com_google_protobuf//:protobuf_headers", ], ) @@ -22,7 +22,7 @@ cc_library( deps = [ "//tensorflow/core:framework_headers_lib", "//third_party/eigen3", - "@protobuf_archive//:protobuf_headers", + "@com_google_protobuf//:protobuf_headers", ], alwayslink = 1, ) @@ -34,7 +34,7 @@ cc_library( "//tensorflow/core:framework_headers_lib", "//tensorflow/core/kernels:bounds_check", "//third_party/eigen3", - "@protobuf_archive//:protobuf_headers", + "@com_google_protobuf//:protobuf_headers", ], alwayslink = 1, ) diff --git a/tensorflow/contrib/ffmpeg/default/BUILD b/tensorflow/contrib/ffmpeg/default/BUILD index 2680cb5c07d..8a28a4068a0 100644 --- a/tensorflow/contrib/ffmpeg/default/BUILD +++ b/tensorflow/contrib/ffmpeg/default/BUILD @@ -21,7 +21,7 @@ cc_library( deps = [ "//tensorflow/core:framework_headers_lib", "//third_party/eigen3", - "@protobuf_archive//:protobuf_headers", + "@com_google_protobuf//:protobuf_headers", ], ) diff --git a/tensorflow/contrib/hadoop/BUILD b/tensorflow/contrib/hadoop/BUILD index 266af0abc56..c948b5080e4 100644 --- a/tensorflow/contrib/hadoop/BUILD +++ b/tensorflow/contrib/hadoop/BUILD @@ -47,7 +47,7 @@ cc_library( deps = [ "//tensorflow/core:framework_headers_lib", "//third_party/eigen3", - "@protobuf_archive//:protobuf_headers", + "@com_google_protobuf//:protobuf_headers", ], alwayslink = 1, ) diff --git a/tensorflow/contrib/ignite/BUILD b/tensorflow/contrib/ignite/BUILD index 2698b83a56a..40ddaa10bc6 100644 --- a/tensorflow/contrib/ignite/BUILD +++ b/tensorflow/contrib/ignite/BUILD @@ -67,7 +67,7 @@ cc_library( deps = [ "//tensorflow/core:framework_headers_lib", "@boringssl//:ssl", - "@protobuf_archive//:protobuf_headers", + "@com_google_protobuf//:protobuf_headers", ], ) @@ -86,7 +86,7 @@ cc_library( ":ignite_client", "//tensorflow/core:framework_headers_lib", "//third_party/eigen3", - "@protobuf_archive//:protobuf_headers", + "@com_google_protobuf//:protobuf_headers", ], alwayslink = 1, ) diff --git a/tensorflow/contrib/image/BUILD b/tensorflow/contrib/image/BUILD index a799523e547..4b14b9e08cf 100755 --- a/tensorflow/contrib/image/BUILD +++ b/tensorflow/contrib/image/BUILD @@ -354,7 +354,7 @@ tf_custom_op_library( "ops/single_image_random_dot_stereograms_ops.cc", ], deps = [ - "@protobuf_archive//:protobuf", + "@com_google_protobuf//:protobuf", ], ) diff --git a/tensorflow/contrib/input_pipeline/kernels/BUILD b/tensorflow/contrib/input_pipeline/kernels/BUILD index 64b614651a1..bad6d3c5cf3 100644 --- a/tensorflow/contrib/input_pipeline/kernels/BUILD +++ b/tensorflow/contrib/input_pipeline/kernels/BUILD @@ -14,7 +14,7 @@ cc_library( deps = [ "//tensorflow/core:framework_headers_lib", "//third_party/eigen3", - "@protobuf_archive//:protobuf_headers", + "@com_google_protobuf//:protobuf_headers", ], alwayslink = 1, ) diff --git a/tensorflow/contrib/kafka/BUILD b/tensorflow/contrib/kafka/BUILD index ad06d3527b4..21f2af3deef 100644 --- a/tensorflow/contrib/kafka/BUILD +++ b/tensorflow/contrib/kafka/BUILD @@ -39,8 +39,8 @@ cc_library( deps = [ "//tensorflow/core:framework_headers_lib", "//third_party/eigen3", + "@com_google_protobuf//:protobuf_headers", "@kafka", - "@protobuf_archive//:protobuf_headers", ], alwayslink = 1, ) diff --git a/tensorflow/contrib/kinesis/BUILD b/tensorflow/contrib/kinesis/BUILD index 25443d0ad47..259ddd83945 100644 --- a/tensorflow/contrib/kinesis/BUILD +++ b/tensorflow/contrib/kinesis/BUILD @@ -43,7 +43,7 @@ cc_library( "//tensorflow/core/platform/s3:aws_crypto", "//third_party/eigen3", "@aws", - "@protobuf_archive//:protobuf_headers", + "@com_google_protobuf//:protobuf_headers", ], alwayslink = 1, ) diff --git a/tensorflow/contrib/layers/kernels/BUILD b/tensorflow/contrib/layers/kernels/BUILD index 187a3a92d73..464550d7413 100644 --- a/tensorflow/contrib/layers/kernels/BUILD +++ b/tensorflow/contrib/layers/kernels/BUILD @@ -14,8 +14,8 @@ cc_library( deps = [ "//tensorflow/core:framework_headers_lib", "//third_party/eigen3", + "@com_google_protobuf//:protobuf_headers", "@farmhash_archive//:farmhash", - "@protobuf_archive//:protobuf_headers", ], alwayslink = 1, ) diff --git a/tensorflow/contrib/periodic_resample/BUILD b/tensorflow/contrib/periodic_resample/BUILD index 9d97b85d851..82e92f656f7 100644 --- a/tensorflow/contrib/periodic_resample/BUILD +++ b/tensorflow/contrib/periodic_resample/BUILD @@ -22,7 +22,7 @@ cc_library( deps = [ "//tensorflow/core:framework_headers_lib", "//third_party/eigen3", - "@protobuf_archive//:protobuf_headers", + "@com_google_protobuf//:protobuf_headers", ], alwayslink = 1, ) diff --git a/tensorflow/contrib/tensor_forest/BUILD b/tensorflow/contrib/tensor_forest/BUILD index e27204dc0a9..fdd7e1e1ee3 100644 --- a/tensorflow/contrib/tensor_forest/BUILD +++ b/tensorflow/contrib/tensor_forest/BUILD @@ -43,7 +43,7 @@ cc_library( ":tree_utils", "//tensorflow/core:framework_headers_lib", "//third_party/eigen3", - "@protobuf_archive//:protobuf_headers", + "@com_google_protobuf//:protobuf_headers", ], alwayslink = 1, ) @@ -388,7 +388,7 @@ cc_library( deps = [ "//tensorflow/core:framework_headers_lib", "//third_party/eigen3", - "@protobuf_archive//:protobuf_headers", + "@com_google_protobuf//:protobuf_headers", ], ) @@ -412,7 +412,7 @@ tf_cc_shared_object( deps = [ ":forest_proto_impl", "//tensorflow/contrib/tensor_forest/kernels/v4:decision-tree-resource_impl", - "@protobuf_archive//:protobuf", + "@com_google_protobuf//:protobuf", ], ) diff --git a/tensorflow/contrib/tensor_forest/hybrid/BUILD b/tensorflow/contrib/tensor_forest/hybrid/BUILD index c5949881108..f21a0f695e8 100644 --- a/tensorflow/contrib/tensor_forest/hybrid/BUILD +++ b/tensorflow/contrib/tensor_forest/hybrid/BUILD @@ -77,7 +77,7 @@ cc_library( deps = [ "//tensorflow/core:framework_headers_lib", "//third_party/eigen3", - "@protobuf_archive//:protobuf_headers", + "@com_google_protobuf//:protobuf_headers", ], ) diff --git a/tensorflow/core/BUILD b/tensorflow/core/BUILD index 8d70fba2b6e..d89df2455be 100644 --- a/tensorflow/core/BUILD +++ b/tensorflow/core/BUILD @@ -455,7 +455,7 @@ cc_library( ":platform_base", ":platform_port", "//tensorflow/core/platform/default/build_config:protobuf", - "@protobuf_archive//:protobuf", + "@com_google_protobuf//:protobuf", ], ) @@ -1928,10 +1928,10 @@ cc_library( ":protos_all_cc_impl", ":stats_calculator_portable", "//third_party/eigen3", + "@com_google_protobuf//:protobuf", "@double_conversion//:double-conversion", "@farmhash_archive//:farmhash", "@nsync//:nsync_cpp", - "@protobuf_archive//:protobuf", ], alwayslink = 1, ) @@ -1953,10 +1953,10 @@ cc_library( ":protos_all_cc_impl", ":stats_calculator_portable", "//third_party/eigen3", + "@com_google_protobuf//:protobuf", "@double_conversion//:double-conversion", "@farmhash_archive//:farmhash", "@nsync//:nsync_cpp", - "@protobuf_archive//:protobuf", ], alwayslink = 1, ) @@ -2012,9 +2012,9 @@ cc_library( ":protos_all_cc_impl", "//third_party/eigen3", "//third_party/fft2d:fft2d_headers", + "@com_google_protobuf//:protobuf", "@fft2d", "@gemmlowp", - "@protobuf_archive//:protobuf", ], alwayslink = 1, ) @@ -2029,10 +2029,10 @@ cc_library( ":protos_all_cc_impl", ":stats_calculator_portable", "//third_party/eigen3", + "@com_google_protobuf//:protobuf", "@double_conversion//:double-conversion", "@farmhash_archive//:farmhash", "@nsync//:nsync_cpp", - "@protobuf_archive//:protobuf", ], alwayslink = 1, ) @@ -2071,7 +2071,7 @@ cc_library( ":protos_all_cc_impl", "//tensorflow/core/kernels:android_tensorflow_kernels", "//third_party/eigen3", - "@protobuf_archive//:protobuf", + "@com_google_protobuf//:protobuf", ], alwayslink = 1, ) @@ -2549,7 +2549,7 @@ cc_library( "@snappy", "@zlib_archive//:zlib", "@double_conversion//:double-conversion", - "@protobuf_archive//:protobuf", + "@com_google_protobuf//:protobuf", ] + tf_protos_all_impl() + tf_protos_grappler_impl() + tf_additional_numa_deps(), ) @@ -2878,10 +2878,10 @@ tf_cuda_library( ] + if_static( extra_deps = [ ":framework_internal_impl", - "@protobuf_archive//:protobuf", + "@com_google_protobuf//:protobuf", ], otherwise = [ - "@protobuf_archive//:protobuf_headers", + "@com_google_protobuf//:protobuf_headers", ], ), alwayslink = 1, @@ -2985,8 +2985,8 @@ tf_cuda_library( "//tensorflow/core/profiler/lib:traceme", "//third_party/eigen3", ] + if_static( - extra_deps = ["@protobuf_archive//:protobuf"], - otherwise = ["@protobuf_archive//:protobuf_headers"], + extra_deps = ["@com_google_protobuf//:protobuf"], + otherwise = ["@com_google_protobuf//:protobuf_headers"], ) + mkl_deps(), alwayslink = 1, ) @@ -5561,7 +5561,7 @@ tf_portable_proto_library( prefix_dir = "emscripten_proto_no_rtti", proto_deps = [ ":protos_all_cc", - "@protobuf_archive//:protobuf", + "@com_google_protobuf//:protobuf", ], visibility = ["//visibility:public"], ) diff --git a/tensorflow/core/kernels/BUILD b/tensorflow/core/kernels/BUILD index 4d241eebb06..2e8de2c6431 100644 --- a/tensorflow/core/kernels/BUILD +++ b/tensorflow/core/kernels/BUILD @@ -6479,9 +6479,9 @@ cc_library( "//tensorflow/core:protos_all_cc_impl", "//third_party/eigen3", "//third_party/fft2d:fft2d_headers", + "@com_google_protobuf//:protobuf", "@fft2d", "@gemmlowp", - "@protobuf_archive//:protobuf", ], alwayslink = 1, ) diff --git a/tensorflow/core/platform/default/build_config.bzl b/tensorflow/core/platform/default/build_config.bzl index 2d5e7bd9ae4..535b68fc258 100644 --- a/tensorflow/core/platform/default/build_config.bzl +++ b/tensorflow/core/platform/default/build_config.bzl @@ -1,6 +1,6 @@ # 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_windows") load("//tensorflow:tensorflow.bzl", "if_not_windows") @@ -132,7 +132,7 @@ def cc_proto_library( deps = [], cc_libs = [], include = None, - protoc = "@protobuf_archive//:protoc", + protoc = "@com_google_protobuf//:protoc", internal_bootstrap_hack = False, use_grpc_plugin = False, use_grpc_namespace = False, @@ -232,7 +232,7 @@ def cc_proto_library( ) native.cc_library( 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, **kargs ) @@ -249,8 +249,8 @@ def py_proto_library( py_libs = [], py_extra_srcs = [], include = None, - default_runtime = "@protobuf_archive//:protobuf_python", - protoc = "@protobuf_archive//:protoc", + default_runtime = "@com_google_protobuf//:protobuf_python", + protoc = "@com_google_protobuf//:protoc", use_grpc_plugin = False, **kargs): """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. proto_gen( name = cc_name + "_genproto", - protoc = "@protobuf_archive//:protoc", + protoc = "@com_google_protobuf//:protoc", visibility = ["//visibility:public"], deps = [s + "_genproto" for s in cc_deps], ) native.cc_library( 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, visibility = visibility, ) native.cc_library( 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 @@ -367,8 +367,8 @@ def tf_proto_library_cc( testonly = testonly, srcs = srcs, cc_libs = cc_libs + if_static( - ["@protobuf_archive//:protobuf"], - ["@protobuf_archive//:protobuf_headers"], + ["@com_google_protobuf//:protobuf"], + ["@com_google_protobuf//:protobuf_headers"], ), copts = if_not_windows([ "-Wno-unknown-warning-option", @@ -376,10 +376,10 @@ def tf_proto_library_cc( "-Wno-sign-compare", ]), 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, visibility = visibility, - deps = cc_deps + ["@protobuf_archive//:cc_wkt_protos"], + deps = cc_deps + ["@com_google_protobuf//:cc_wkt_protos"], ) def tf_proto_library_py( @@ -398,13 +398,13 @@ def tf_proto_library_py( # libraries containing all the sources. proto_gen( name = py_name + "_genproto", - protoc = "@protobuf_archive//:protoc", + protoc = "@com_google_protobuf//:protoc", visibility = ["//visibility:public"], deps = [s + "_genproto" for s in py_deps], ) native.py_library( name = py_name, - deps = py_deps + ["@protobuf_archive//:protobuf_python"], + deps = py_deps + ["@com_google_protobuf//:protobuf_python"], testonly = testonly, visibility = visibility, ) @@ -414,12 +414,12 @@ def tf_proto_library_py( name = py_name, testonly = testonly, srcs = srcs, - default_runtime = "@protobuf_archive//:protobuf_python", - protoc = "@protobuf_archive//:protoc", + default_runtime = "@com_google_protobuf//:protobuf_python", + protoc = "@com_google_protobuf//:protoc", srcs_version = srcs_version, use_grpc_plugin = use_grpc_plugin, 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): @@ -730,7 +730,7 @@ def tf_lib_proto_parsing_deps(): def tf_lib_proto_compiler_deps(): return [ - "@protobuf_archive//:protoc_lib", + "@com_google_protobuf//:protoc_lib", ] def tf_additional_verbs_lib_defines(): diff --git a/tensorflow/core/platform/s3/BUILD b/tensorflow/core/platform/s3/BUILD index 7bc4d80db5b..d518bfb71a2 100644 --- a/tensorflow/core/platform/s3/BUILD +++ b/tensorflow/core/platform/s3/BUILD @@ -34,8 +34,8 @@ tf_cc_binary( deps = [ "//tensorflow/core:framework_headers_lib", "@aws", + "@com_google_protobuf//:protobuf_headers", "@curl", - "@protobuf_archive//:protobuf_headers", ], ) diff --git a/tensorflow/core/util/proto/BUILD b/tensorflow/core/util/proto/BUILD index 7bfaf8f62be..526d500b579 100644 --- a/tensorflow/core/util/proto/BUILD +++ b/tensorflow/core/util/proto/BUILD @@ -71,7 +71,7 @@ cc_library( "//tensorflow/core:platform_base", "@com_google_absl//absl/strings", "@com_google_absl//absl/time", - "@protobuf_archive//:protobuf_headers", + "@com_google_protobuf//:protobuf_headers", ], ) diff --git a/tensorflow/go/genop/generate.sh b/tensorflow/go/genop/generate.sh index a894c87c276..446ddbe35a5 100644 --- a/tensorflow/go/genop/generate.sh +++ b/tensorflow/go/genop/generate.sh @@ -41,7 +41,7 @@ then then echo "Protocol buffer compiler protoc not found in PATH or in ${PROTOC}" echo "Perhaps build it using:" - echo "bazel build --config opt @protobuf_archive//:protoc" + echo "bazel build --config opt @com_google_protobuf//:protoc" exit 1 fi PROTOC=$PATH_PROTOC diff --git a/tensorflow/lite/toco/BUILD b/tensorflow/lite/toco/BUILD index c6200ad4e5e..ca8903ec880 100644 --- a/tensorflow/lite/toco/BUILD +++ b/tensorflow/lite/toco/BUILD @@ -167,7 +167,7 @@ cc_library( ], deps = [ # Placeholder for internal file dependency. - "@protobuf_archive//:protobuf_headers", + "@com_google_protobuf//:protobuf_headers", "//tensorflow/core:framework_lite", "//tensorflow/core:lib", "//tensorflow/core:lib_internal", @@ -329,7 +329,7 @@ cc_library( ":toco_flags_proto_cc", ":toco_port", ":tooling_util", - "@protobuf_archive//:protobuf_headers", + "@com_google_protobuf//:protobuf_headers", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "//tensorflow/core:core_cpu_lib", @@ -385,8 +385,8 @@ cc_library( "//tensorflow/lite/kernels/internal:types", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", + "@com_google_protobuf//:protobuf_headers", "@com_googlesource_code_re2//:re2", - "@protobuf_archive//:protobuf_headers", ], ) diff --git a/tensorflow/lite/toco/tensorflow_graph_matching/BUILD b/tensorflow/lite/toco/tensorflow_graph_matching/BUILD index 3aa262c6892..0ec0ac44a25 100644 --- a/tensorflow/lite/toco/tensorflow_graph_matching/BUILD +++ b/tensorflow/lite/toco/tensorflow_graph_matching/BUILD @@ -54,7 +54,7 @@ cc_library( "//tensorflow/lite/toco:model", "//tensorflow/lite/toco:toco_port", "//tensorflow/lite/toco:tooling_util", - "@protobuf_archive//:protobuf_headers", + "@com_google_protobuf//:protobuf_headers", ], ) diff --git a/tensorflow/python/BUILD b/tensorflow/python/BUILD index 232f903a6f2..607116a039a 100644 --- a/tensorflow/python/BUILD +++ b/tensorflow/python/BUILD @@ -521,7 +521,7 @@ tf_cc_shared_object( deps = [ "//tensorflow/core:framework_headers_lib", "//third_party/eigen3", - "@protobuf_archive//:protobuf_headers", + "@com_google_protobuf//:protobuf_headers", ], ) @@ -4413,8 +4413,8 @@ py_library( deps = [ "//tensorflow/tools/compatibility:all_renames_v2", "//third_party/py/numpy", + "@com_google_protobuf//:protobuf_python", "@org_python_pypi_backports_weakref", - "@protobuf_archive//:protobuf_python", "@six_archive//:six", ], ) diff --git a/tensorflow/python/kernel_tests/proto/BUILD b/tensorflow/python/kernel_tests/proto/BUILD index 21d961b7a7a..5a0f6a9efef 100644 --- a/tensorflow/python/kernel_tests/proto/BUILD +++ b/tensorflow/python/kernel_tests/proto/BUILD @@ -111,7 +111,7 @@ py_library( ":proto_op_test_base", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", - "@protobuf_archive//:protobuf_python", + "@com_google_protobuf//:protobuf_python", ], ) diff --git a/tensorflow/tensorflow.bzl b/tensorflow/tensorflow.bzl index 1769bda2691..c3ef1dcde75 100644 --- a/tensorflow/tensorflow.bzl +++ b/tensorflow/tensorflow.bzl @@ -1668,7 +1668,7 @@ def cc_header_only_library(name, deps = [], includes = [], extra_deps = [], **kw def tf_custom_op_library_additional_deps(): return [ - "@protobuf_archive//:protobuf_headers", + "@com_google_protobuf//:protobuf_headers", clean_dep("//third_party/eigen3"), clean_dep("//tensorflow/core:framework_headers_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. def tf_custom_op_library_additional_deps_impl(): return [ - "@protobuf_archive//:protobuf", + "@com_google_protobuf//:protobuf", "@nsync//:nsync_cpp", # for //third_party/eigen3 clean_dep("//third_party/eigen3"), diff --git a/tensorflow/tools/lib_package/BUILD b/tensorflow/tools/lib_package/BUILD index b96b412baec..60c92fbc2a3 100644 --- a/tensorflow/tools/lib_package/BUILD +++ b/tensorflow/tools/lib_package/BUILD @@ -160,7 +160,7 @@ genrule( "@nasm//:LICENSE", "@nsync//:LICENSE", "@png_archive//:LICENSE", - "@protobuf_archive//:LICENSE", + "@com_google_protobuf//:LICENSE", "@snappy//:COPYING", "@zlib_archive//:zlib.h", ] + select({ @@ -231,7 +231,7 @@ genrule( "@nasm//:LICENSE", "@nsync//:LICENSE", "@png_archive//:LICENSE", - "@protobuf_archive//:LICENSE", + "@com_google_protobuf//:LICENSE", "@snappy//:COPYING", "@zlib_archive//:zlib.h", "@grpc//:LICENSE", diff --git a/tensorflow/tools/pip_package/BUILD b/tensorflow/tools/pip_package/BUILD index e0e190343db..bdc4b0afe20 100644 --- a/tensorflow/tools/pip_package/BUILD +++ b/tensorflow/tools/pip_package/BUILD @@ -186,7 +186,7 @@ filegroup( "@pasta//:LICENSE", "@pcre//:LICENCE", "@png_archive//:LICENSE", - "@protobuf_archive//:LICENSE", + "@com_google_protobuf//:LICENSE", "@six_archive//:LICENSE", "@snappy//:COPYING", "@swig//:LICENSE", diff --git a/tensorflow/tools/pip_package/build_pip_package.sh b/tensorflow/tools/pip_package/build_pip_package.sh index a7de1f8a426..8c19ca010e9 100755 --- a/tensorflow/tools/pip_package/build_pip_package.sh +++ b/tensorflow/tools/pip_package/build_pip_package.sh @@ -60,8 +60,8 @@ function reorganize_includes() { move_to_root_if_exists external/jsoncpp_git/include rm -rf external/jsoncpp_git - move_to_root_if_exists external/protobuf_archive/src/google - rm -rf external/protobuf_archive/python + move_to_root_if_exists external/com_google_protobuf/src/google + rm -rf external/com_google_protobuf/python popd } diff --git a/tensorflow/tools/pip_package/setup.py b/tensorflow/tools/pip_package/setup.py index c87b96f7164..7de51f98ecb 100644 --- a/tensorflow/tools/pip_package/setup.py +++ b/tensorflow/tools/pip_package/setup.py @@ -245,8 +245,8 @@ else: headers = ( list(find_files('*.h', 'tensorflow_core/core')) + list(find_files('*.h', 'tensorflow_core/stream_executor')) + - list(find_files('*.h', 'google/protobuf_archive/src')) + - list(find_files('*.inc', 'google/protobuf_archive/src')) + + list(find_files('*.h', 'google/com_google_protobuf/src')) + + list(find_files('*.inc', 'google/com_google_protobuf/src')) + list(find_files('*', 'third_party/eigen3')) + list( find_files('*.h', 'tensorflow_core/include/external/com_google_absl')) + list( diff --git a/tensorflow/tools/proto_text/BUILD b/tensorflow/tools/proto_text/BUILD index c3bbed5e595..4e5db0ce58d 100644 --- a/tensorflow/tools/proto_text/BUILD +++ b/tensorflow/tools/proto_text/BUILD @@ -38,7 +38,7 @@ cc_binary( visibility = ["//tensorflow:internal"], deps = [ ":gen_proto_text_functions_lib", - "@protobuf_archive//:protobuf", + "@com_google_protobuf//:protobuf", "//tensorflow/core:lib_proto_parsing", "//tensorflow/core:lib_proto_compiler", ] + if_ios(["//tensorflow/core/platform/default/build_config:logging"]), diff --git a/tensorflow/workspace.bzl b/tensorflow/workspace.bzl index b7179433974..73ed88ce619 100755 --- a/tensorflow/workspace.bzl +++ b/tensorflow/workspace.bzl @@ -383,21 +383,6 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""): # defined using bind for grpc. 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( name = "com_google_protobuf", patch_file = PROTOBUF_PATCH, @@ -410,18 +395,6 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""): 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( name = "nsync", sha256 = "704be7f58afa47b99476bbac7aafd1a9db4357cef519db361716f13538547ffd", @@ -978,20 +951,20 @@ def tf_bind(): # Needed by gRPC native.bind( name = "protobuf", - actual = "@protobuf_archive//:protobuf", + actual = "@com_google_protobuf//:protobuf", ) # gRPC expects //external:protobuf_clib and //external:protobuf_compiler # to point to Protobuf's compiler library. native.bind( name = "protobuf_clib", - actual = "@protobuf_archive//:protoc_lib", + actual = "@com_google_protobuf//:protoc_lib", ) # Needed by gRPC native.bind( name = "protobuf_headers", - actual = "@protobuf_archive//:protobuf_headers", + actual = "@com_google_protobuf//:protobuf_headers", ) # Needed by Protobuf diff --git a/third_party/googleapis.BUILD b/third_party/googleapis.BUILD index b8871eda728..59a5758e3cf 100644 --- a/third_party/googleapis.BUILD +++ b/third_party/googleapis.BUILD @@ -18,7 +18,7 @@ licenses(["notice"]) # Apache 2.0 exports_files(["LICENSE"]) -load("@protobuf_archive//:protobuf.bzl", "cc_proto_library") +load("@com_google_protobuf//:protobuf.bzl", "cc_proto_library") cc_proto_library( name = "bigtable_protos", @@ -40,8 +40,8 @@ cc_proto_library( "google/rpc/status.proto", ], include = ".", - default_runtime = "@protobuf_archive//:protobuf", - protoc = "@protobuf_archive//:protoc", + default_runtime = "@com_google_protobuf//:protobuf", + protoc = "@com_google_protobuf//:protoc", use_grpc_plugin = True, - deps = ["@protobuf_archive//:cc_wkt_protos"], + deps = ["@com_google_protobuf//:cc_wkt_protos"], ) diff --git a/third_party/pprof.BUILD b/third_party/pprof.BUILD index 8bd5bacaf12..bfa8da71312 100644 --- a/third_party/pprof.BUILD +++ b/third_party/pprof.BUILD @@ -4,15 +4,15 @@ package( licenses(["notice"]) # MIT -load("@protobuf_archive//:protobuf.bzl", "py_proto_library") +load("@com_google_protobuf//:protobuf.bzl", "py_proto_library") exports_files(["pprof/LICENSE"]) py_proto_library( name = "pprof_proto_py", srcs = ["proto/profile.proto"], - default_runtime = "@protobuf_archive//:protobuf_python", - protoc = "@protobuf_archive//:protoc", + default_runtime = "@com_google_protobuf//:protobuf_python", + protoc = "@com_google_protobuf//:protoc", srcs_version = "PY2AND3", - deps = ["@protobuf_archive//:protobuf_python"], + deps = ["@com_google_protobuf//:protobuf_python"], ) diff --git a/third_party/systemlibs/protobuf.BUILD b/third_party/systemlibs/protobuf.BUILD index e1f7c3ae666..89a3f8c3fa7 100644 --- a/third_party/systemlibs/protobuf.BUILD +++ b/third_party/systemlibs/protobuf.BUILD @@ -1,5 +1,5 @@ load( - "@protobuf_archive//:protobuf.bzl", + "@com_google_protobuf//:protobuf.bzl", "proto_gen", "py_proto_library", "cc_proto_library", @@ -93,7 +93,7 @@ cc_proto_library( proto_gen( name = "protobuf_python_genproto", includes = ["."], - protoc = "@protobuf_archive//:protoc", + protoc = "@com_google_protobuf//:protoc", visibility = ["//visibility:public"], ) diff --git a/third_party/systemlibs/syslibs_configure.bzl b/third_party/systemlibs/syslibs_configure.bzl index a2d4123fd62..114826b2af4 100644 --- a/third_party/systemlibs/syslibs_configure.bzl +++ b/third_party/systemlibs/syslibs_configure.bzl @@ -16,7 +16,6 @@ VALID_LIBS = [ "com_github_googleapis_googleapis", "com_github_googlecloudplatform_google_cloud_cpp", "com_google_protobuf", - "com_google_protobuf_cc", "com_googlesource_code_re2", "curl", "cython", @@ -37,7 +36,6 @@ VALID_LIBS = [ "pasta", "pcre", "png_archive", - "protobuf_archive", "six_archive", "snappy", "swig",