deps: Fix protobuf bazel build

see: https://github.com/protocolbuffers/protobuf/pull/12320/files
This commit is contained in:
Corentin Le Molgat
2023-03-29 11:28:58 +02:00
parent 3681f4d3c0
commit b658fd7e37

View File

@@ -69,6 +69,22 @@ index 2e38c1bac..0c26a97f4 100644
${protobuf_BINARY_DIR}
${protobuf_SOURCE_DIR}/src)
diff --git a/build_defs/cpp_opts.bzl b/build_defs/cpp_opts.bzl
index f95c3e257..5a32371da 100644
--- a/build_defs/cpp_opts.bzl
+++ b/build_defs/cpp_opts.bzl
@@ -36,6 +36,11 @@ LINK_OPTS = select({
# Suppress linker warnings about files with no symbols defined.
"-ignore:4221",
],
+ "@platforms//os:macos": [
+ "-lpthread",
+ "-lm",
+ "-framework CoreFoundation",
+ ],
"//conditions:default": [
"-lpthread",
"-lm",
diff --git a/src/google/protobuf/port.h b/src/google/protobuf/port.h
index 9ca45d966..6bbf1d164 100644
--- a/src/google/protobuf/port.h