mirror of
https://gitflic.ru/project/erthink/libmdbx.git
synced 2025-01-29 19:39:19 +00:00
mdbx-cmake: add workaround for LTO on Android (https://reviews.llvm.org/D79919).
This commit is contained in:
parent
066bb696e3
commit
489f7a3136
@ -448,8 +448,13 @@ if(CMAKE_COMPILER_IS_CLANG)
|
|||||||
AND NOT (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux"
|
AND NOT (CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux"
|
||||||
AND CMAKE_SYSTEM_NAME STREQUAL "Linux"))
|
AND CMAKE_SYSTEM_NAME STREQUAL "Linux"))
|
||||||
OR APPLE))
|
OR APPLE))
|
||||||
|
if(ANDROID AND CMAKE_SYSTEM_VERSION VERSION_LESS 22)
|
||||||
|
set(CLANG_LTO_AVAILABLE FALSE)
|
||||||
|
message(STATUS "Link-Time Optimization by CLANG/LLVM is available but unusable due https://reviews.llvm.org/D79919")
|
||||||
|
else()
|
||||||
set(CLANG_LTO_AVAILABLE TRUE)
|
set(CLANG_LTO_AVAILABLE TRUE)
|
||||||
message(STATUS "Link-Time Optimization by CLANG/LLVM is available")
|
message(STATUS "Link-Time Optimization by CLANG/LLVM is available")
|
||||||
|
endif()
|
||||||
elseif(CMAKE_TOOLCHAIN_FILE AND NOT CMAKE_${CMAKE_PRIMARY_LANG}_COMPILER_VERSION VERSION_LESS 7.0)
|
elseif(CMAKE_TOOLCHAIN_FILE AND NOT CMAKE_${CMAKE_PRIMARY_LANG}_COMPILER_VERSION VERSION_LESS 7.0)
|
||||||
set(CLANG_LTO_AVAILABLE TRUE)
|
set(CLANG_LTO_AVAILABLE TRUE)
|
||||||
if(NOT CMAKE_CLANG_LD)
|
if(NOT CMAKE_CLANG_LD)
|
||||||
|
Loading…
Reference in New Issue
Block a user