Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / tools / llvm-objdump / CMakeLists.txt
blob0306736388979b199d30d9d6b5b5c5fb254c7df7
1 set(LLVM_LINK_COMPONENTS
2   AllTargetsDescs
3   AllTargetsDisassemblers
4   AllTargetsInfos
5   BinaryFormat
6   DebugInfoBTF
7   DebugInfoDWARF
8   Demangle
9   MC
10   MCDisassembler
11   Object
12   Option
13   Support
14   Symbolize
15   TargetParser
16   )
18 set(LLVM_TARGET_DEFINITIONS ObjdumpOpts.td)
19 tablegen(LLVM ObjdumpOpts.inc -gen-opt-parser-defs)
20 add_public_tablegen_target(ObjdumpOptsTableGen)
22 set(LLVM_TARGET_DEFINITIONS OtoolOpts.td)
23 tablegen(LLVM OtoolOpts.inc -gen-opt-parser-defs)
24 add_public_tablegen_target(OtoolOptsTableGen)
26 add_llvm_tool(llvm-objdump
27   llvm-objdump.cpp
28   SourcePrinter.cpp
29   COFFDump.cpp
30   ELFDump.cpp
31   MachODump.cpp
32   OffloadDump.cpp
33   WasmDump.cpp
34   XCOFFDump.cpp
35   DEPENDS
36   ObjdumpOptsTableGen
37   OtoolOptsTableGen
38   GENERATE_DRIVER
39   )
41 if(NOT LLVM_TOOL_LLVM_DRIVER_BUILD)
42   target_link_libraries(llvm-objdump PRIVATE LLVMDebuginfod)
43 endif()
45 add_llvm_tool_symlink(llvm-otool llvm-objdump)
47 if(LLVM_INSTALL_BINUTILS_SYMLINKS)
48   add_llvm_tool_symlink(objdump llvm-objdump)
49 endif()
51 if(LLVM_INSTALL_CCTOOLS_SYMLINKS)
52   add_llvm_tool_symlink(otool llvm-otool)
53 endif()