mdbx-cmake: fix detection of Clang's LTO availability for Android.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2022-04-21 22:11:14 +03:00
parent bdf5fb7a72
commit b1101fc33e

View File

@ -468,7 +468,7 @@ if(CMAKE_COMPILER_IS_CLANG)
AND NOT (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux"
AND CMAKE_SYSTEM_NAME STREQUAL "Linux"))
OR APPLE))
if(ANDROID AND CMAKE_SYSTEM_VERSION VERSION_LESS 22)
if(ANDROID AND CMAKE_${CMAKE_PRIMARY_LANG}_COMPILER_VERSION VERSION_LESS 12)
set(CLANG_LTO_AVAILABLE FALSE)
message(STATUS "Link-Time Optimization by CLANG/LLVM is available but unusable due https://reviews.llvm.org/D79919")
else()