Skip to content

Commit f88df62

Browse files
FooIbarjschwe
authored andcommitted
Fix Android toolchain selection
Both `armv7` and `thumbv7neon` generate Thumb code, the only difference is Neon.
1 parent 1499b14 commit f88df62

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmake/FindRust.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -735,10 +735,10 @@ if (NOT Rust_CARGO_TARGET_CACHED)
735735
endif()
736736
elseif (ANDROID)
737737
if (CMAKE_ANDROID_ARCH_ABI STREQUAL armeabi-v7a)
738-
if (CMAKE_ANDROID_ARM_MODE)
739-
set(_Rust_ANDROID_TARGET armv7-linux-androideabi)
740-
else ()
738+
if (CMAKE_ANDROID_ARM_NEON)
741739
set(_Rust_ANDROID_TARGET thumbv7neon-linux-androideabi)
740+
else ()
741+
set(_Rust_ANDROID_TARGET armv7-linux-androideabi)
742742
endif()
743743
elseif (CMAKE_ANDROID_ARCH_ABI STREQUAL arm64-v8a)
744744
set(_Rust_ANDROID_TARGET aarch64-linux-android)

0 commit comments

Comments
 (0)