Skip to content

Commit

Permalink
macOS: -mmacosx-version-min is required for setting min version (li…
Browse files Browse the repository at this point in the history
…te-xl#1192)

* Set `MACOSX_DEPLOYMENT_TARGET` also
  • Loading branch information
vkedwardli authored Nov 10, 2022
1 parent acebbfd commit 1590be8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,17 @@ main() {
fi

if [[ $CROSS_ARCH != "" ]]; then
if [[ $platform == "macos" && $CROSS_ARCH == "arm64" ]]; then
if [[ $platform == "macos" ]]; then
macos_version_min=10.11
if [[ $CROSS_ARCH == "arm64" ]]; then
cross_file="--cross-file resources/macos/macos_arm64.conf"
macos_version_min=11.0
fi
export MACOSX_DEPLOYMENT_TARGET=$macos_version_min
export MIN_SUPPORTED_MACOSX_DEPLOYMENT_TARGET=$macos_version_min
export CFLAGS=-mmacosx-version-min=$macos_version_min
export CXXFLAGS=-mmacosx-version-min=$macos_version_min
export LDFLAGS=-mmacosx-version-min=$macos_version_min
fi
fi

Expand Down

0 comments on commit 1590be8

Please sign in to comment.