Home | History | Annotate | Download | only in lto
      1 set(LLVM_LINK_COMPONENTS
      2   ${LLVM_TARGETS_TO_BUILD}
      3   Core
      4   LTO
      5   MC
      6   MCDisassembler
      7   Support
      8   Target
      9   )
     10 
     11 set(SOURCES
     12   LTODisassembler.cpp
     13   lto.cpp
     14   )
     15 
     16 set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/lto.exports)
     17 
     18 add_llvm_library(LTO SHARED ${SOURCES})
     19 
     20 install(FILES ${LLVM_MAIN_INCLUDE_DIR}/llvm-c/lto.h
     21   DESTINATION include/llvm-c)
     22 
     23 if (APPLE)
     24   set(LTO_VERSION ${LLVM_VERSION_MAJOR})
     25   if(LLVM_LTO_VERSION_OFFSET)
     26     math(EXPR LTO_VERSION "${LLVM_VERSION_MAJOR} + ${LLVM_LTO_VERSION_OFFSET}")
     27   endif()
     28   set_property(TARGET LTO APPEND_STRING PROPERTY
     29               LINK_FLAGS
     30               " -compatibility_version 1 -current_version ${LTO_VERSION}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}")
     31 endif()
     32