Skip to content

Commit 10d37d9

Browse files
committed
Enforce fast-path objc_msgSend() aka non-legacy dispatch
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
1 parent 1e13337 commit 10d37d9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

phases/20-gnustep-make.sh

+9
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,22 @@ mkdir -p "${INSTALL_PREFIX}"/etc/GNUstep
1919
GNUSTEP_USER_CONFIG_FILE="${INSTALL_PREFIX}"/etc/GNUstep/GNUstep-user.conf
2020
cp "${ROOT_DIR}"/config/gnustep-make-user.config "${GNUSTEP_USER_CONFIG_FILE}"
2121

22+
OPTIONS=
23+
if [ "$ABI_NAME" == "arm64-v8a" ]; then
24+
# enforce fast-path objc_msgSend() aka non-legacy dispatch (not enabled by default on arm64)
25+
# can be removed when Clang 18 containing this patch is available via the Android SDK:
26+
# https://github.com/llvm/llvm-project/pull/76694
27+
OPTIONS="OBJCFLAGS=-fno-objc-legacy-dispatch"
28+
fi
29+
2230
echo -e "\n### Running configure"
2331
./configure \
2432
--host=${ANDROID_TARGET} \
2533
--prefix="${INSTALL_PREFIX}" \
2634
--with-library-combo=ng-gnu-gnu \
2735
--with-user-config-file="${GNUSTEP_USER_CONFIG_FILE}" \
2836
--with-runtime-abi=gnustep-2.0 \
37+
${OPTIONS}
2938

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

0 commit comments

Comments
 (0)