OSDN Git Service

Break false dependencies on target libraries
authorDaniel Sanders <daniel_l_sanders@apple.com>
Thu, 23 May 2019 23:02:56 +0000 (23:02 +0000)
committerDaniel Sanders <daniel_l_sanders@apple.com>
Thu, 23 May 2019 23:02:56 +0000 (23:02 +0000)
commit6519fa1cbe46fcf1119c2b6309d21a9005104a0e
tree8f85dab830e5156dd80d9473ad573230e96503a8
parente94ac06b694fe5c3f2a733ea7ee0bb1e9bf69ed6
Break false dependencies on target libraries

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361567 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
cmake/modules/LLVM-Config.cmake
tools/bugpoint/CMakeLists.txt
tools/dsymutil/CMakeLists.txt
tools/llc/CMakeLists.txt
tools/llvm-ar/CMakeLists.txt
tools/llvm-c-test/CMakeLists.txt
tools/llvm-cxxdump/CMakeLists.txt
tools/llvm-dwp/CMakeLists.txt
tools/llvm-lto/CMakeLists.txt
tools/llvm-lto2/CMakeLists.txt
tools/llvm-rtdyld/CMakeLists.txt
tools/llvm-xray/CMakeLists.txt
tools/lto/CMakeLists.txt
tools/opt/CMakeLists.txt