mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
a8b39698e1
This makes it so lto.h is installed when you run the install-LTO target. llvm-svn: 262066
33 lines
745 B
CMake
33 lines
745 B
CMake
set(LLVM_LINK_COMPONENTS
|
|
${LLVM_TARGETS_TO_BUILD}
|
|
Core
|
|
LTO
|
|
MC
|
|
MCDisassembler
|
|
Support
|
|
Target
|
|
)
|
|
|
|
set(SOURCES
|
|
LTODisassembler.cpp
|
|
lto.cpp
|
|
)
|
|
|
|
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/lto.exports)
|
|
|
|
add_llvm_library(LTO SHARED ${SOURCES})
|
|
|
|
install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/lto.h
|
|
DESTINATION include/llvm-c
|
|
COMPONENT LTO)
|
|
|
|
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}.${LLVM_VERSION_PATCH}")
|
|
endif()
|