From 35ac9bc072e652e8bac9cd501f94d3b089b8f9a2 Mon Sep 17 00:00:00 2001 From: Frederik Seiffert Date: Sat, 10 Sep 2022 12:38:31 +0100 Subject: [PATCH] Don't pass ANDROID_ARM_NEON testing C++ runtime Fixes building for Android arm64-v8a with NDK r25, which no longer supports this flag. Since we were passing this unconditionally we were previously inadvertently disabling NEON support if the flag wasn't set. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8ac86a1..559555d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -228,7 +228,7 @@ function(test_cxx CXX_RUNTIME_NAME IS_STDLIB) message(STATUS "Testing ${CXX_RUNTIME_LIB} as the C++ runtime library") if (ANDROID) # pass on Android toolchain flags - set(CXX_RUNTIME_FLAGS "-DANDROID_NDK=${ANDROID_NDK}" "-DANDROID_ABI=${ANDROID_ABI}" "-DANDROID_ARM_MODE=${ANDROID_ARM_MODE}" "-DANDROID_ARM_NEON=${ANDROID_ARM_NEON}" "-DANDROID_LD=${ANDROID_LD}" "-DANDROID_PLATFORM=${ANDROID_PLATFORM}" "-DANDROID_STL=${ANDROID_STL}") + set(CXX_RUNTIME_FLAGS "-DANDROID_NDK=${ANDROID_NDK}" "-DANDROID_ABI=${ANDROID_ABI}" "-DANDROID_ARM_MODE=${ANDROID_ARM_MODE}" "-DANDROID_LD=${ANDROID_LD}" "-DANDROID_PLATFORM=${ANDROID_PLATFORM}" "-DANDROID_STL=${ANDROID_STL}") endif() try_compile(USERUNTIME "${CMAKE_BINARY_DIR}/CMake"