mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
cmake: check clang version for fat runtime support
This commit is contained in:
parent
f29b203a86
commit
0d87116d33
@ -258,13 +258,20 @@ endif()
|
|||||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||||
# This is a Linux-only feature for now - requires platform support
|
# This is a Linux-only feature for now - requires platform support
|
||||||
# elsewhere
|
# elsewhere
|
||||||
option(FAT_RUNTIME "Build a library that supports multiple microarchitecures" ${RELEASE_BUILD})
|
if (CMAKE_C_COMPILER_ID MATCHES "Clang" AND
|
||||||
if (FAT_RUNTIME)
|
CMAKE_C_COMPILER_VERSION VERSION_LESS "3.9")
|
||||||
|
message (STATUS "Clang v3.9 or higher required for fat runtime, cannot build fat runtime")
|
||||||
|
set (FAT_RUNTIME_REQUISITES FALSE)
|
||||||
|
else ()
|
||||||
include (${CMAKE_MODULE_PATH}/attrib.cmake)
|
include (${CMAKE_MODULE_PATH}/attrib.cmake)
|
||||||
if (NOT HAS_C_ATTR_IFUNC)
|
if (NOT HAS_C_ATTR_IFUNC)
|
||||||
message(FATAL_ERROR "Compiler does not support ifunc attribute, cannot build fat runtime")
|
message(STATUS "Compiler does not support ifunc attribute, cannot build fat runtime")
|
||||||
|
set (FAT_RUNTIME_REQUISITES FALSE)
|
||||||
|
else ()
|
||||||
|
set (FAT_RUNTIME_REQUISITES TRUE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
CMAKE_DEPENDENT_OPTION(FAT_RUNTIME "Build a library that supports multiple microarchitecures" ${RELEASE_BUILD} "FAT_RUNTIME_REQUISITES" OFF)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
include (${CMAKE_MODULE_PATH}/arch.cmake)
|
include (${CMAKE_MODULE_PATH}/arch.cmake)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user