From 37538b817e06c76aee7124f0bbd30d2ef74ed542 Mon Sep 17 00:00:00 2001 From: Anay Wadhera Date: Thu, 27 Feb 2025 11:38:18 -0800 Subject: [PATCH] Move to macos dylib PiperOrigin-RevId: 731803885 --- connections/c/BUILD | 10 ++++++---- connections/c/macOS_exported_symbols.txt | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 connections/c/macOS_exported_symbols.txt diff --git a/connections/c/BUILD b/connections/c/BUILD index d94701a0..6c419151 100644 --- a/connections/c/BUILD +++ b/connections/c/BUILD @@ -13,6 +13,7 @@ # limitations under the License. load("@rules_apple//apple:apple.bzl", "apple_static_xcframework") +load("@rules_apple//apple:macos.bzl", "macos_dylib") load("//third_party/cpptoolchains/windows_llvm/build_defs:windows.bzl", "windows") package(default_visibility = [ @@ -92,10 +93,11 @@ windows.cc_windows_dll( ) # macOS. -cc_binary( - name = "libnc.so", - linkshared = 1, - linkstatic = 1, +macos_dylib( + name = "libnc", + exported_symbols_lists = ["macOS_exported_symbols.txt"], + linkopts = ["-install_name,@rpath/libnc.dylib"], + minimum_os_version = "10.15", tags = ["notap"], deps = [ ":nc", diff --git a/connections/c/macOS_exported_symbols.txt b/connections/c/macOS_exported_symbols.txt new file mode 100644 index 00000000..1614708b --- /dev/null +++ b/connections/c/macOS_exported_symbols.txt @@ -0,0 +1,19 @@ +_NcCreateService +_NcCloseService +_NcStartAdvertising +_NcStopAdvertising +_NcStartDiscovery +_NcStopDiscovery +_NcInjectEndpoint +_NcRequestConnection +_NcAcceptConnection +_NcRejectConnection +_NcSendPayload +_NcCancelPayload +_NcDisconnectFromEndpoint +_NcStopAllEndpoints +_NcInitiateBandwidthUpgrade +_NcGetLocalEndpointId +_NcEnableBleV2 +_NcSetCustomSavePath +_NcSetPhenotypeFlagReader