From b1101fc33e7b19ad33c7a4a895dd46b287aa8e3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Thu, 21 Apr 2022 22:11:14 +0300 Subject: [PATCH] mdbx-cmake: fix detection of Clang's LTO availability for Android. --- cmake/compiler.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/compiler.cmake b/cmake/compiler.cmake index ddc113ce..aa61ecfa 100644 --- a/cmake/compiler.cmake +++ b/cmake/compiler.cmake @@ -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()