Skip to content

Commit

Permalink
Enforce fast-path objc_msgSend() aka non-legacy dispatch
Browse files Browse the repository at this point in the history
Forces Clang to use the fast path, which is not enabled by default on arm64 even though it's supported in the runtime.

Can be removed when Clang 18 containing this patch is available via the Android SDK:
llvm/llvm-project#76694
  • Loading branch information
triplef committed Feb 9, 2024
1 parent 1e13337 commit 10d37d9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions phases/20-gnustep-make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,22 @@ mkdir -p "${INSTALL_PREFIX}"/etc/GNUstep
GNUSTEP_USER_CONFIG_FILE="${INSTALL_PREFIX}"/etc/GNUstep/GNUstep-user.conf
cp "${ROOT_DIR}"/config/gnustep-make-user.config "${GNUSTEP_USER_CONFIG_FILE}"

OPTIONS=
if [ "$ABI_NAME" == "arm64-v8a" ]; then
# enforce fast-path objc_msgSend() aka non-legacy dispatch (not enabled by default on arm64)
# can be removed when Clang 18 containing this patch is available via the Android SDK:
# https://github.com/llvm/llvm-project/pull/76694
OPTIONS="OBJCFLAGS=-fno-objc-legacy-dispatch"
fi

echo -e "\n### Running configure"
./configure \
--host=${ANDROID_TARGET} \
--prefix="${INSTALL_PREFIX}" \
--with-library-combo=ng-gnu-gnu \
--with-user-config-file="${GNUSTEP_USER_CONFIG_FILE}" \
--with-runtime-abi=gnustep-2.0 \
${OPTIONS}

echo -e "\n### Installing"
make install

0 comments on commit 10d37d9

Please sign in to comment.