Home | History | Annotate | Download | only in lto
      1 set(LLVM_LINK_COMPONENTS
      2   ${LLVM_TARGETS_TO_BUILD}
      3   ipo scalaropts linker bitreader bitwriter mcdisassembler vectorize)
      4 
      5 add_definitions( -DLLVM_VERSION_INFO=\"${PACKAGE_VERSION}\" )
      6 
      7 set(SOURCES
      8   LTOCodeGenerator.cpp
      9   LTODisassembler.cpp
     10   lto.cpp
     11   LTOModule.cpp
     12   )
     13 
     14 set(LLVM_COMMON_DEPENDS intrinsics_gen)
     15 
     16 if( NOT WIN32 AND LLVM_ENABLE_PIC )
     17   set(bsl ${BUILD_SHARED_LIBS})
     18   set(BUILD_SHARED_LIBS ON)
     19   add_llvm_library(LTO ${SOURCES})
     20   set_property(TARGET LTO PROPERTY OUTPUT_NAME "LTO")
     21   set(BUILD_SHARED_LIBS ${bsl})
     22   set(LTO_STATIC_TARGET_NAME LTO_static)
     23 else()
     24   set(LTO_STATIC_TARGET_NAME LTO)
     25 endif()
     26 
     27 if( NOT BUILD_SHARED_LIBS )
     28   add_llvm_library(${LTO_STATIC_TARGET_NAME} ${SOURCES})
     29   set_property(TARGET ${LTO_STATIC_TARGET_NAME} PROPERTY OUTPUT_NAME "LTO")
     30 endif()
     31