From ce929a121fb4dc4cb269aea7b65eaa4b93faa92e Mon Sep 17 00:00:00 2001 From: klockky Date: Sat, 11 Jul 2026 00:03:36 +0300 Subject: [PATCH] =?UTF-8?q?fix(android):=20armv7=20rlottie=20=E2=80=94=20-?= =?UTF-8?q?U=5F=5FARM=5FNEON=5F=5F=20=D0=B2=D0=BC=D0=B5=D1=81=D1=82=D0=BE?= =?UTF-8?q?=20=D0=BD=D0=B5=D0=B0=D1=81=D1=81=D0=B5=D0=BC=D0=B1=D0=BB=D0=B8?= =?UTF-8?q?=D1=80=D1=83=D0=B5=D0=BC=D0=BE=D0=B3=D0=BE=20pixman=20NEON=20as?= =?UTF-8?q?m?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- third_party/rlottie_build/CMakeLists.txt | 5 +++++ third_party/rlottie_build/KOMET_NOTES.md | 12 +++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/third_party/rlottie_build/CMakeLists.txt b/third_party/rlottie_build/CMakeLists.txt index 6ca3c55..fa7bc83 100644 --- a/third_party/rlottie_build/CMakeLists.txt +++ b/third_party/rlottie_build/CMakeLists.txt @@ -73,4 +73,9 @@ target_link_libraries(rlottie ${OSSPEC_LIBS} ) +if (CMAKE_ANDROID_ARCH_ABI STREQUAL "armeabi-v7a" + OR CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm|armv7)") + target_compile_options(rlottie PRIVATE -U__ARM_NEON__) +endif() + add_subdirectory(${RLOTTIE}/src "${CMAKE_CURRENT_BINARY_DIR}/rlottie_src") diff --git a/third_party/rlottie_build/KOMET_NOTES.md b/third_party/rlottie_build/KOMET_NOTES.md index a943060..c4c00ad 100644 --- a/third_party/rlottie_build/KOMET_NOTES.md +++ b/third_party/rlottie_build/KOMET_NOTES.md @@ -51,6 +51,16 @@ loops. Web has no native path and falls back to the pure-Dart `lottie` player. `DynamicLibrary.open('rlottie.framework/rlottie')`. - **Windows:** rlottie builds with `/EHs-c- /GR-` and links `Shlwapi.lib` (set in `CMakeLists.txt`). -- **32-bit ARM:** the pixman NEON `.S` asm is not wired; armv7 uses the C path. +- **32-bit ARM (armeabi-v7a):** the compiler predefines `__ARM_NEON__`, which pulls + in `vdrawhelper_neon.cpp`'s hand-written NEON blitter. That blitter calls + `pixman_composite_*_asm_neon`, defined only in `pixman-arm-neon-asm.S`. Upstream + gates that `.S` behind the CMake var `ARCH == arm` (set by its meson/top-level + build, which this glue bypasses), so the symbols are undefined and the armv7 link + fails. Wiring the `.S` back in is a dead end on NDK r28: it's GNU-assembler syntax + that LLVM's integrated assembler rejects, and the NDK no longer ships GNU `as` + (`-fno-integrated-as` has no fallback). So `CMakeLists.txt` here passes + `-U__ARM_NEON__` for 32-bit ARM, which drops the hand-asm path and lets the C + fallback (`memfill32` in `vdrawhelper.cpp`, guarded by the same macro) take over. + The C loops still auto-vectorize to NEON via `-mfpu=neon`. - **Bumping rlottie:** `cd third_party/rlottie && git checkout `, rebuild, then re-check `apple/config.h` and the podspec source globs still match upstream.