set(LLVM_LINK_COMPONENTS
${LLVM_TARGETS_TO_BUILD}
- ipo scalaropts linker bitreader bitwriter)
-
-add_definitions( -DLLVM_VERSION_INFO=\"${PACKAGE_VERSION}\" )
-
-# TODO: build a static library too.
-set(BUILD_SHARED_LIBS ON)
+ Core
+ LTO
+ MC
+ MCDisassembler
+ Support
+ )
-add_llvm_library(LTO
- LTOCodeGenerator.cpp
+set(SOURCES
+ LTODisassembler.cpp
lto.cpp
- LTOModule.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)