diff --git a/tensorflow/core/lib/core/BUILD b/tensorflow/core/lib/core/BUILD index 5a99f1ab764..f9bd2441547 100644 --- a/tensorflow/core/lib/core/BUILD +++ b/tensorflow/core/lib/core/BUILD @@ -30,6 +30,7 @@ cc_library( "//tensorflow/core/platform:logging", "//tensorflow/core/platform:types", ], + alwayslink = 1, ) cc_library( diff --git a/tensorflow/core/platform/BUILD b/tensorflow/core/platform/BUILD index c9fca55015d..aabad23aa60 100644 --- a/tensorflow/core/platform/BUILD +++ b/tensorflow/core/platform/BUILD @@ -268,6 +268,7 @@ cc_library( "@com_google_absl//absl/base", "@com_google_absl//absl/synchronization", ], + alwayslink = 1, ) cc_library( diff --git a/tensorflow/core/platform/default/build_refactor.bzl b/tensorflow/core/platform/default/build_refactor.bzl index 50514472ce7..d82e8813485 100644 --- a/tensorflow/core/platform/default/build_refactor.bzl +++ b/tensorflow/core/platform/default/build_refactor.bzl @@ -210,6 +210,7 @@ TF_DEFAULT_PLATFORM_LIBRARIES = { ], "visibility": ["//visibility:private"], "tags": ["no_oss", "manual"], + "alwayslink": 1, }, "notification": { "name": "notification_impl", @@ -298,6 +299,7 @@ TF_DEFAULT_PLATFORM_LIBRARIES = { ], "tags": ["no_oss", "manual"], "visibility": ["//visibility:private"], + "alwayslink": 1, }, "test": { "name": "test_impl", diff --git a/tensorflow/lite/python/testdata/BUILD b/tensorflow/lite/python/testdata/BUILD index 0c12e19451c..1b501507aa5 100644 --- a/tensorflow/lite/python/testdata/BUILD +++ b/tensorflow/lite/python/testdata/BUILD @@ -61,6 +61,7 @@ cc_library( deps = [ "//tensorflow/lite/c:c_api_internal", ], + alwayslink = 1, ) cc_binary( diff --git a/tensorflow/python/BUILD b/tensorflow/python/BUILD index e928b002d93..2fc6d5de5d4 100644 --- a/tensorflow/python/BUILD +++ b/tensorflow/python/BUILD @@ -439,6 +439,7 @@ cc_library( "//tensorflow/core:lib", "//tensorflow/core:protos_all_cc", ], + alwayslink = 1, ) tf_python_pybind_extension( diff --git a/tensorflow/tools/graph_transforms/BUILD b/tensorflow/tools/graph_transforms/BUILD index 870edf5581a..06390ce9945 100644 --- a/tensorflow/tools/graph_transforms/BUILD +++ b/tensorflow/tools/graph_transforms/BUILD @@ -234,6 +234,7 @@ cc_library( "//tensorflow/core:lib_internal", "//tensorflow/core:protos_all_cc", ], + alwayslink = 1, ) # This library includes a main function, to make it easy to create other diff --git a/third_party/icu/data/BUILD.bazel b/third_party/icu/data/BUILD.bazel index 6ff47a8d5fc..80ea92ce9b4 100644 --- a/third_party/icu/data/BUILD.bazel +++ b/third_party/icu/data/BUILD.bazel @@ -40,4 +40,5 @@ cc_library( name = "conversion_data", srcs = [":conversion_data.c"], deps = ["@icu//:headers"], + alwayslink = 1, )