fix universal build (#1621)

This commit is contained in:
cyan 2024-08-18 14:25:44 +02:00 committed by GitHub
parent fe4b3e4eb0
commit 4071e460f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -23,12 +23,14 @@ then
done
else
if [[ "x$1" == "xuniversal" ]]; then
ARCHS=(arm64 x86_64)
ARCHS=(x86_64 arm64)
else
ARCHS=$(uname -m)
fi
for COIN in monero wownero;
do
MONERO_LIBS=""
WOWNERO_LIBS=""
for ARCH in "${ARCHS[@]}";
do
if [[ "$ARCH" == "arm64" ]]; then
@ -39,11 +41,13 @@ else
HOST="${ARCH}-host-apple-darwin"
fi
MONERO_LIBS=" -arch ${ARCH} ${MONEROC_RELEASE_DIR}/${HOST}_libwallet2_api_c.dylib"
WOWNERO_LIBS=" -arch ${ARCH} ${WOWNEROC_RELEASE_DIR}/${HOST}_libwallet2_api_c.dylib"
MONERO_LIBS="$MONERO_LIBS -arch ${ARCH} ${MONEROC_RELEASE_DIR}/${HOST}_libwallet2_api_c.dylib"
WOWNERO_LIBS="$WOWNERO_LIBS -arch ${ARCH} ${WOWNEROC_RELEASE_DIR}/${HOST}_libwallet2_api_c.dylib"
if [[ ! $(uname -m) == $ARCH ]]; then
PRC="arch -${ARCH}"
else
PRC=""
fi
pushd ../monero_c