Android: Do not use gold for ndk >= r22

Fixes: #21772
This commit is contained in:
Haibo Huang
2021-02-26 13:23:10 -08:00
committed by Brad King
parent ed7a87f270
commit 005e2cdfb0

View File

@@ -77,7 +77,7 @@ else()
set(CMAKE_${lang}_COMPILE_OPTIONS_IPO "-flto")
endif()
if(ANDROID)
if(ANDROID AND NOT CMAKE_ANDROID_NDK_VERSION VERSION_GREATER_EQUAL "22")
# https://github.com/android-ndk/ndk/issues/242
set(CMAKE_${lang}_LINK_OPTIONS_IPO "-fuse-ld=gold")
endif()