2011-03-12 17:48:49 +01:00
|
|
|
set(LLVM_LINK_COMPONENTS
|
2019-05-24 01:02:56 +02:00
|
|
|
AllTargetsAsmParsers
|
|
|
|
AllTargetsCodeGens
|
|
|
|
AllTargetsDescs
|
|
|
|
AllTargetsDisassemblers
|
|
|
|
AllTargetsInfos
|
2016-07-12 05:01:22 +02:00
|
|
|
BitReader
|
2014-12-20 02:51:02 +01:00
|
|
|
Core
|
2013-12-10 12:13:32 +01:00
|
|
|
LTO
|
|
|
|
MC
|
2014-01-31 18:57:50 +01:00
|
|
|
MCDisassembler
|
2013-12-10 12:13:32 +01:00
|
|
|
Support
|
2015-06-03 21:07:51 +02:00
|
|
|
Target
|
2013-12-10 12:13:32 +01:00
|
|
|
)
|
2011-03-11 16:44:24 +01:00
|
|
|
|
2011-03-12 18:32:30 +01:00
|
|
|
set(SOURCES
|
2012-11-24 17:59:10 +01:00
|
|
|
LTODisassembler.cpp
|
2011-03-11 16:44:24 +01:00
|
|
|
lto.cpp
|
|
|
|
)
|
|
|
|
|
2013-12-29 00:31:44 +01:00
|
|
|
set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/lto.exports)
|
2013-10-08 17:07:00 +02:00
|
|
|
|
2019-07-12 16:40:18 +02:00
|
|
|
add_llvm_library(LTO SHARED INSTALL_WITH_TOOLCHAIN ${SOURCES} DEPENDS intrinsics_gen)
|
2013-08-26 18:54:12 +02:00
|
|
|
|
2014-02-21 15:57:09 +01:00
|
|
|
install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/lto.h
|
2016-02-26 22:07:02 +01:00
|
|
|
DESTINATION include/llvm-c
|
|
|
|
COMPONENT LTO)
|
2015-10-14 00:54:29 +02:00
|
|
|
|
|
|
|
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
|
2015-10-14 09:50:21 +02:00
|
|
|
" -compatibility_version 1 -current_version ${LTO_VERSION}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}")
|
2015-10-14 00:54:29 +02:00
|
|
|
endif()
|