1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/tools/llvm-objdump/CMakeLists.txt
Mariusz Ceier 4faf75c7ac Fix lld macho standalone build by including llvm/Config/llvm-config.h instead of llvm/Config/config.h
lld/MachO/Driver.cpp and lld/MachO/SyntheticSections.cpp include
llvm/Config/config.h which doesn't exist when building standalone lld.

This patch replaces llvm/Config/config.h include with llvm/Config/llvm-config.h
just like it is in lld/ELF/Driver.cpp and HAVE_LIBXAR with LLVM_HAVE_LIXAR and
moves LLVM_HAVE_LIBXAR from config.h to llvm-config.h

Also it adds LLVM_HAVE_LIBXAR to LLVMConfig.cmake and links liblldMachO2.so
with XAR_LIB if LLVM_HAVE_LIBXAR is set.

Differential Revision: https://reviews.llvm.org/D102084
2021-05-19 11:15:07 -04:00

47 lines
919 B
CMake

set(LLVM_LINK_COMPONENTS
AllTargetsDescs
AllTargetsDisassemblers
AllTargetsInfos
BinaryFormat
DebugInfoDWARF
DebugInfoPDB
Demangle
MC
MCDisassembler
Object
Option
Support
Symbolize
)
set(LLVM_TARGET_DEFINITIONS ObjdumpOpts.td)
tablegen(LLVM ObjdumpOpts.inc -gen-opt-parser-defs)
add_public_tablegen_target(ObjdumpOptsTableGen)
set(LLVM_TARGET_DEFINITIONS OtoolOpts.td)
tablegen(LLVM OtoolOpts.inc -gen-opt-parser-defs)
add_public_tablegen_target(OtoolOptsTableGen)
add_llvm_tool(llvm-objdump
llvm-objdump.cpp
SourcePrinter.cpp
COFFDump.cpp
ELFDump.cpp
MachODump.cpp
WasmDump.cpp
XCOFFDump.cpp
DEPENDS
ObjdumpOptsTableGen
OtoolOptsTableGen
)
if(LLVM_HAVE_LIBXAR)
target_link_libraries(llvm-objdump PRIVATE ${XAR_LIB})
endif()
add_llvm_tool_symlink(llvm-otool llvm-objdump)
if(LLVM_INSTALL_BINUTILS_SYMLINKS)
add_llvm_tool_symlink(objdump llvm-objdump)
endif()