Skip to content

Commit

Permalink
cares.sh: try workaround for hiding symbols 2
Browse files Browse the repository at this point in the history
  • Loading branch information
vszakats committed Jan 26, 2025
1 parent 90246d6 commit a49be86
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions cares.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@ _VER="$1"

rm -r -f "${_PKGDIR:?}" "${_BLDDIR:?}"

CFLAGS=''
options=''

if [ "${_OS}" = 'mac' ] && [ "${_OSVER}" -lt '1011' ]; then
# connectx() requires 10.11
options+=' -DHAVE_CONNECTX=0'
if [ "${_OS}" = 'mac' ]; then
CFLAGS+=' -fvisibility=hidden'
if [ "${_OSVER}" -lt '1011' ]; then
# connectx() requires 10.11
options+=' -DHAVE_CONNECTX=0'
fi
fi

# Workaround to apply this to the static library too:
Expand All @@ -42,7 +46,7 @@ _VER="$1"
-DCARES_BUILD_TESTS=OFF \
-DCARES_BUILD_CONTAINER_TESTS=OFF \
-DCARES_BUILD_TOOLS=OFF \
-DCMAKE_C_FLAGS="${_CFLAGS_GLOBAL_CMAKE} ${_CFLAGS_GLOBAL} ${_CPPFLAGS_GLOBAL} ${_LDFLAGS_GLOBAL}"
-DCMAKE_C_FLAGS="${_CFLAGS_GLOBAL_CMAKE} ${_CFLAGS_GLOBAL} ${_CPPFLAGS_GLOBAL} ${CFLAGS} ${_LDFLAGS_GLOBAL}"

cmake --build "${_BLDDIR}"
cmake --install "${_BLDDIR}" --prefix "${_PP}"
Expand Down

0 comments on commit a49be86

Please sign in to comment.