PR #34044: Patch @com_google_absl to always export //absl/time:time symbols

Imported from GitHub PR https://github.com/tensorflow/tensorflow/pull/34044

This should fix tensorflow/addons#663, caused by changing logic in Bazel on which symbols we export (see https://github.com/bazelbuild/bazel/issues/7362).
Copybara import of the project:

PiperOrigin-RevId: 280275294
Change-Id: I1a21010f47367f66ab33ba51aefe5226f8191b30
This commit is contained in:
A. Unique TensorFlower 2019-11-13 14:06:21 -08:00 committed by TensorFlower Gardener
parent b6cbff89d1
commit 5acf6bdd2b
3 changed files with 3 additions and 16 deletions

View File

@ -30,6 +30,7 @@ tensorflow/third_party/clang_toolchain/cc_configure_clang.bzl
tensorflow/third_party/clang_toolchain/download_clang.bzl
tensorflow/third_party/codegen.BUILD
tensorflow/third_party/com_google_absl.BUILD
tensorflow/third_party/com_google_absl_fix_mac_build.patch
tensorflow/third_party/common.bzl
tensorflow/third_party/cub.BUILD
tensorflow/third_party/curl.BUILD

View File

@ -157,14 +157,8 @@ def tf_repositories(path_prefix = "", tf_repo_name = ""):
tf_http_archive(
name = "com_google_absl",
build_file = clean_dep("//third_party:com_google_absl.BUILD"),
# TODO: Remove everything but the patch to absl/time/BUILD.bazel when
# https://github.com/abseil/abseil-cpp/issues/326 is resolved.
# The patch to absl/time/BUILD.bazel serves to export absl symbols, as changes
# on Bazel side (https://github.com/bazelbuild/bazel/issues/7362) caused the linker
# to not link the whole library by default (see
# https://github.com/tensorflow/addons/issues/663).
# We can get rid of it once we have mechanism to control which symbols to export.
patch_file = clean_dep("//third_party:com_google_absl.patch"),
# TODO: Remove the patch when https://github.com/abseil/abseil-cpp/issues/326 is resolved.
patch_file = clean_dep("//third_party:com_google_absl_fix_mac_build.patch"),
sha256 = "acd93f6baaedc4414ebd08b33bebca7c7a46888916101d8c0b8083573526d070",
strip_prefix = "abseil-cpp-43ef2148c0936ebf7cb4be6b19927a9d9d145b8f",
urls = [

View File

@ -16,11 +16,3 @@
visibility = ["//visibility:public"],
deps = [":civil_time"],
)
--- ./absl/time/BUILD.bazel 2019-11-06 14:47:19.534845941 +0100
+++ ./absl/time/BUILD.bazel.fixed 2019-11-06 14:46:52.682912347 +0100
@@ -53,6 +53,7 @@
"//absl/time/internal/cctz:civil_time",
"//absl/time/internal/cctz:time_zone",
],
+ alwayslink = 1,
)