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