mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-01 13:11:39 +01:00
3812992d9b
Summary: For the most part this consists of replacing ${LLVM_TARGETS_TO_BUILD} with some combination of AllTargets* so that they depend on specific components of a target backend rather than all of it. The overall effect of this is that, for example, tools like opt no longer falsely depend on the disassembler, while tools like llvm-ar no longer depend on the code generator. There's a couple quirks to point out here: * AllTargetsCodeGens is a bit more prevalent than expected. Tools like dsymutil seem to need it which I was surprised by. * llvm-xray linked to all the backends but doesn't seem to need any of them. It builds and passes the tests so that seems to be correct. * I left gold out as it's not built when binutils is not available so I'm unable to test it Reviewers: bogner, JDevlieghere Reviewed By: bogner Subscribers: mehdi_amini, mgorny, steven_wu, dexonsmith, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62331 llvm-svn: 361567
38 lines
859 B
CMake
38 lines
859 B
CMake
set(LLVM_LINK_COMPONENTS
|
|
AllTargetsAsmParsers
|
|
AllTargetsCodeGens
|
|
AllTargetsDescs
|
|
AllTargetsDisassemblers
|
|
AllTargetsInfos
|
|
BitReader
|
|
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} DEPENDS intrinsics_gen)
|
|
|
|
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()
|