On Android, here is clang compiler change for
NDKs after ndk-r17c where the compiler intrinsics
for libpng are not part of the compiler for the
armeabi-v7a targets.
Add the supported png functions for these compiler
intrinsics, explicitly for 32-bit ARM builds.
Affects:
dEQP-VK.*
Components: Vulkan, Framework
VK-GL-CTS issue: 1638
Change-Id: Ib832f983294f5dd747720ed4a79a21e29a06f776
(cherry picked from commit
99a88af740c425bf250ce9cb2143aa6be3a778f2)
${PNG_ABS_PATH}/pngpread.c
)
-if (DE_CPU_IS_ARM_64)
+
+if(DE_CPU_IS_ARM AND NOT DEFINED DE_CPU_IS_ARM_NEON)
+ set(DE_CPU_IS_ARM_NEON 1)
+ message(STATUS "DE_CPU_IS_ARM_NEON is not defined: Assuming ARM NEON is supported.")
+else ()
+ set(DE_CPU_IS_ARM_NEON 0)
+endif()
+
+if (DE_CPU_IS_ARM_64 OR (DE_CPU_IS_ARM AND DE_CPU_IS_ARM_NEON))
# armv8-a has always neon
set(PNG_SRCS
${PNG_SRCS}
${PNG_ABS_PATH}/arm/filter_neon_intrinsics.c
${PNG_ABS_PATH}/arm/filter_neon.S
)
+else ()
+ message(STATUS "Disabling ARM NEON optimizations.")
+ add_definitions(-DPNG_ARM_NEON_OPT=0)
endif ()
+
if (DE_DEBUG EQUAL 1)
add_definitions(-DPNG_DEBUG)
endif ()