From e6645115b8a838b40a49c73cb948dc373c5e98c8 Mon Sep 17 00:00:00 2001 From: wangjiezhe Date: Fri, 24 Nov 2023 16:42:48 +0800 Subject: [PATCH 04/13] tensorflow_cc: Add systemlib nsync linkopts Linkopts dont get propagated up to the shared library correctly so workaround by applying them directly --- tensorflow/BUILD | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tensorflow/BUILD b/tensorflow/BUILD index 202553cd531..63ce1e7b385 100644 --- a/tensorflow/BUILD +++ b/tensorflow/BUILD @@ -39,6 +39,7 @@ load( "tf_cc_shared_library", ) load("@local_config_cuda//cuda:build_defs.bzl", "if_cuda") +load("@local_config_syslibs//:build_defs.bzl", "if_system_lib") # copybara:uncomment_begin # load("//devtools/copybara/rules:copybara.bzl", "copybara_config_test") @@ -1312,7 +1313,7 @@ tf_cc_shared_library( "-z defs", "-Wl,--version-script,$(location //tensorflow:tf_version_script.lds)", ], - }), + }) + if_system_lib("nsync", ["-lnsync_cpp"]), per_os_targets = True, roots = [ "//tensorflow/c:c_api", -- 2.41.0