Skip to content

Enable crc instructions when building for arm64 cpu (iOS) #1154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion TestScripts/setenv-ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ unset IOS_CFLAGS
unset IOS_CXXFLAGS
unset IOS_LDFLAGS
unset IOS_SYSROOT
unset CRC

#########################################
##### Small Fixups, if needed #####
Expand Down Expand Up @@ -133,6 +134,7 @@ fi

if [[ "${IOS_CPU}" == "aarch64" || "${IOS_CPU}" == "arm64"* || "${IOS_CPU}" == "armv8"* ]] ; then
IOS_CPU=arm64
CRC="-mcrc"
fi

echo "Configuring for ${IOS_SDK} (${IOS_CPU})"
Expand Down Expand Up @@ -282,7 +284,7 @@ if [ -z "${XCODE_SDK}" ]; then
fi

IOS_CFLAGS="-arch ${IOS_CPU} ${MIN_VER} -fno-common"
IOS_CXXFLAGS="-arch ${IOS_CPU} ${MIN_VER} -stdlib=libc++ -fno-common"
IOS_CXXFLAGS="-arch ${IOS_CPU} ${CRC} ${MIN_VER} -stdlib=libc++ -fno-common"
IOS_SYSROOT="${XCODE_DEVELOPER_SDK}/${XCODE_SDK}"

if [ ! -d "${IOS_SYSROOT}" ]; then
Expand Down