File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ for ITEM in $ITEMS; do
4545 cd ..
4646done
4747
48+ rm -f $MERGED_LIBRARY
4849ar -qc $MERGED_LIBRARY $LIBS
4950
5051
Original file line number Diff line number Diff line change @@ -27,12 +27,19 @@ if [[ $# -lt 1 ]]; then
2727fi
2828
2929CMAKE_BUILD_DIRECTORY=$1
30+
31+ # libprotoc.a is the protobuf compiler (protoc) tool library, not the runtime.
32+ # It pulls in google::protobuf::compiler::java::* and absl debugging/VDSO symbols
33+ # that are not needed by client code and cannot be satisfied without additional deps.
34+ # libprotobuf-lite.a is a subset of libprotobuf.a and causes duplicate symbols.
35+ EXCLUDE_PATTERN=" libprotoc.a\|libprotobuf-lite.a"
36+
3037if [[ $VCPKG_TRIPLET ]]; then
3138 ./merge_archives.sh $CMAKE_BUILD_DIRECTORY /libpulsarwithdeps.a \
3239 $CMAKE_BUILD_DIRECTORY /lib/libpulsar.a \
33- $( find " $CMAKE_BUILD_DIRECTORY /vcpkg_installed/$VCPKG_TRIPLET " -name " *.a" | grep -v debug)
40+ $( find " $CMAKE_BUILD_DIRECTORY /vcpkg_installed/$VCPKG_TRIPLET " -name " *.a" | grep -v ' / debug/ ' | grep -v " $EXCLUDE_PATTERN " )
3441else
3542 ./merge_archives.sh $CMAKE_BUILD_DIRECTORY /libpulsarwithdeps.a \
3643 $CMAKE_BUILD_DIRECTORY /lib/libpulsar.a \
37- $( find " $CMAKE_BUILD_DIRECTORY /vcpkg_installed" -name " *.a" | grep -v debug)
44+ $( find " $CMAKE_BUILD_DIRECTORY /vcpkg_installed" -name " *.a" | grep -v ' / debug/ ' | grep -v " $EXCLUDE_PATTERN " )
3845fi
You can’t perform that action at this time.
0 commit comments