Skip to content

Commit ba2ba22

Browse files
committed
fix: running tor on older macos versions
1 parent 83bf7c2 commit ba2ba22

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

scripts/build-tor.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ elif [[ "$PLATFORM" == "macos" ]]; then
4545
export CXX=clang++
4646
export AR=$(xcrun --find ar)
4747
export RANLIB=$(xcrun --find ranlib)
48+
export MACOSX_DEPLOYMENT_TARGET=10.15
49+
export CFLAGS="${CFLAGS:-} -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET"
50+
export LDFLAGS="${LDFLAGS:-} -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET"
4851
OPENSSLDIR="$BUILDDIR/openssl"
4952
LIBEVENTDIR="$BUILDDIR/libevent"
5053
else
@@ -220,6 +223,9 @@ elif [[ "$PLATFORM" == "macos" ]]; then
220223
-change "$LIBEVENTDIR/lib/$LIBEVENT_FILE" \
221224
"@executable_path/$LIBEVENT_FILE" \
222225
"$TORBINDIR/tor"
226+
install_name_tool \
227+
-id "@executable_path/$LIBEVENT_FILE" \
228+
"$TORBINDIR/$LIBEVENT_FILE"
223229

224230
else
225231
install -s "$DISTDIR/bin/tor.exe" "$TORBINDIR"

0 commit comments

Comments
 (0)