mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
[CMake] Add compatibility and current versioning to libLTO to match autoconf support.
This also adds LLVM_LTO_VERSION_OFFSET to support functional equivalence to autoconf. llvm-svn: 250245
This commit is contained in:
parent
a190c153d6
commit
4b5a0d9544
@ -19,3 +19,13 @@ add_llvm_library(LTO SHARED ${SOURCES})
|
||||
|
||||
install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/lto.h
|
||||
DESTINATION include/llvm-c)
|
||||
|
||||
if (APPLE)
|
||||
set(LTO_VERSION ${LLVM_VERSION_MAJOR})
|
||||
if(LLVM_LTO_VERSION_OFFSET)
|
||||
math(EXPR LTO_VERSION "${LLVM_VERSION_MAJOR} + ${LLVM_LTO_VERSION_OFFSET}")
|
||||
endif()
|
||||
set_property(TARGET LTO APPEND_STRING PROPERTY
|
||||
LINK_FLAGS
|
||||
" -compatibility_version 1 -current_version ${LTO_VERSION}.${LLVM_VERSION_MINOR}")
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user