llvm-project/lldb/source/Plugins/ABI/CMakeLists.txt

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
877 B
CMake
Raw Normal View History

Have ABI plugins vend llvm MCRegisterInfo data Summary: I was recently surprised to learn that there is a total of 2 (two) users of the register info definitions contained in the ABI plugins. Yet, the defitions themselves span nearly 10kLOC. The two users are: - dwarf expression pretty printer - the mechanism for augmenting the register info definitions obtained over gdb-remote protocol (AugmentRegisterInfoViaABI) Both of these uses need the DWARF an EH register numbers, which is information that is already available in LLVM. This patch makes it possible to do so. It adds a GetMCRegisterInfo method to the ABI class, which every class is expected to implement. Normally, it should be sufficient to obtain the definitions from the appropriate llvm::Target object (for which I provide a utility function), but the subclasses are free to construct it in any way they deem fit. We should be able to always get the MCRegisterInfo object from llvm, with one important exception: if the relevant llvm target was disabled at compile time. To handle this, I add a mechanism to disable the compilation of ABI plugins based on the value of LLVM_TARGETS_TO_BUILD cmake setting. This ensures all our existing are able to create their MCRegisterInfo objects. The new MCRegisterInfo api is not used yet, but the intention is to make use of it in follow-up patches. Reviewers: jasonmolenda, aprantl, JDevlieghere, tatyana-krasnukha Subscribers: wuzish, nemanjai, mgorny, kbarton, atanasyan, lldb-commits Differential Revision: https://reviews.llvm.org/D67965 llvm-svn: 372862
2019-09-25 21:03:04 +08:00
if ("AArch64" IN_LIST LLVM_TARGETS_TO_BUILD)
add_subdirectory(MacOSX-arm64)
add_subdirectory(SysV-arm64)
endif()
if ("ARM" IN_LIST LLVM_TARGETS_TO_BUILD)
add_subdirectory(MacOSX-arm)
add_subdirectory(SysV-arm)
endif()
if ("ARC" IN_LIST LLVM_TARGETS_TO_BUILD)
add_subdirectory(SysV-arc)
endif()
Have ABI plugins vend llvm MCRegisterInfo data Summary: I was recently surprised to learn that there is a total of 2 (two) users of the register info definitions contained in the ABI plugins. Yet, the defitions themselves span nearly 10kLOC. The two users are: - dwarf expression pretty printer - the mechanism for augmenting the register info definitions obtained over gdb-remote protocol (AugmentRegisterInfoViaABI) Both of these uses need the DWARF an EH register numbers, which is information that is already available in LLVM. This patch makes it possible to do so. It adds a GetMCRegisterInfo method to the ABI class, which every class is expected to implement. Normally, it should be sufficient to obtain the definitions from the appropriate llvm::Target object (for which I provide a utility function), but the subclasses are free to construct it in any way they deem fit. We should be able to always get the MCRegisterInfo object from llvm, with one important exception: if the relevant llvm target was disabled at compile time. To handle this, I add a mechanism to disable the compilation of ABI plugins based on the value of LLVM_TARGETS_TO_BUILD cmake setting. This ensures all our existing are able to create their MCRegisterInfo objects. The new MCRegisterInfo api is not used yet, but the intention is to make use of it in follow-up patches. Reviewers: jasonmolenda, aprantl, JDevlieghere, tatyana-krasnukha Subscribers: wuzish, nemanjai, mgorny, kbarton, atanasyan, lldb-commits Differential Revision: https://reviews.llvm.org/D67965 llvm-svn: 372862
2019-09-25 21:03:04 +08:00
if ("Hexagon" IN_LIST LLVM_TARGETS_TO_BUILD)
add_subdirectory(SysV-hexagon)
endif()
if ("Mips" IN_LIST LLVM_TARGETS_TO_BUILD)
add_subdirectory(SysV-mips)
add_subdirectory(SysV-mips64)
endif()
if ("PowerPC" IN_LIST LLVM_TARGETS_TO_BUILD)
add_subdirectory(SysV-ppc)
add_subdirectory(SysV-ppc64)
endif()
if ("SystemZ" IN_LIST LLVM_TARGETS_TO_BUILD)
add_subdirectory(SysV-s390x)
endif()
if ("X86" IN_LIST LLVM_TARGETS_TO_BUILD)
add_subdirectory(SysV-i386)
add_subdirectory(SysV-x86_64)
add_subdirectory(MacOSX-i386)
add_subdirectory(Windows-x86_64)
endif()