Skip to content

Commit

Permalink
Upgrade minimum macOS version to 10.15 (Catalina) (#257)
Browse files Browse the repository at this point in the history
Required for C++17, aligned alloc etc.
  • Loading branch information
lovell authored Nov 1, 2024
1 parent f83d1f9 commit 9e53a16
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ for flavour in darwin-x64 darwin-arm64v8; do
export PKG_CONFIG="$(brew --prefix)/bin/pkg-config --static"

# Earliest supported version of macOS
export MACOSX_DEPLOYMENT_TARGET="10.13"
export MACOSX_DEPLOYMENT_TARGET="10.15"

# Added -fno-stack-check to workaround a stack misalignment bug on macOS 10.15
# See:
Expand Down
3 changes: 0 additions & 3 deletions build/lin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,6 @@ fi
mkdir ${DEPS}/zlib-ng
$CURL https://github.com/zlib-ng/zlib-ng/archive/${VERSION_ZLIB_NG}.tar.gz | tar xzC ${DEPS}/zlib-ng --strip-components=1
cd ${DEPS}/zlib-ng
if [ "$MACOSX_DEPLOYMENT_TARGET" = "10.13" ]; then
sed -i'.bak' "/-DHAVE_ALIGNED_ALLOC/d" CMakeLists.txt
fi
CFLAGS="${CFLAGS} -O3" cmake -G"Unix Makefiles" \
-DCMAKE_TOOLCHAIN_FILE=${ROOT}/Toolchain.cmake -DCMAKE_INSTALL_PREFIX=${TARGET} -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=FALSE -DZLIB_COMPAT=TRUE -DWITH_ARMV6=FALSE
Expand Down
2 changes: 1 addition & 1 deletion platforms/darwin-x64/Toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SET(CMAKE_C_COMPILER clang)
SET(CMAKE_CXX_COMPILER clang++)

# Earliest supported version of macOS
SET(CMAKE_OSX_DEPLOYMENT_TARGET 10.13)
SET(CMAKE_OSX_DEPLOYMENT_TARGET 10.15)

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
Expand Down

0 comments on commit 9e53a16

Please sign in to comment.