Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / ELF / CMakeLists.txt
blob475f7dea1dd7e907ac3333fb61f3e5b3fb1a9ddf
1 set(LLVM_TARGET_DEFINITIONS Options.td)
2 tablegen(LLVM Options.inc -gen-opt-parser-defs)
3 add_public_tablegen_target(ELFOptionsTableGen)
5 if(LLVM_ENABLE_ZLIB)
6   set(imported_libs ZLIB::ZLIB)
7 endif()
9 if(LLVM_ENABLE_ZSTD)
10   if(TARGET zstd::libzstd_shared AND NOT LLVM_USE_STATIC_ZSTD)
11     set(zstd_target zstd::libzstd_shared)
12   else()
13     set(zstd_target zstd::libzstd_static)
14   endif()
15 endif()
17 if(LLVM_ENABLE_ZSTD)
18   list(APPEND imported_libs ${zstd_target})
19 endif()
21 add_lld_library(lldELF
22   AArch64ErrataFix.cpp
23   Arch/AArch64.cpp
24   Arch/AMDGPU.cpp
25   Arch/ARM.cpp
26   Arch/AVR.cpp
27   Arch/Hexagon.cpp
28   Arch/LoongArch.cpp
29   Arch/Mips.cpp
30   Arch/MipsArchTree.cpp
31   Arch/MSP430.cpp
32   Arch/PPC.cpp
33   Arch/PPC64.cpp
34   Arch/RISCV.cpp
35   Arch/SPARCV9.cpp
36   Arch/X86.cpp
37   Arch/X86_64.cpp
38   ARMErrataFix.cpp
39   CallGraphSort.cpp
40   DWARF.cpp
41   Driver.cpp
42   DriverUtils.cpp
43   EhFrame.cpp
44   ICF.cpp
45   InputFiles.cpp
46   InputSection.cpp
47   LTO.cpp
48   LinkerScript.cpp
49   MapFile.cpp
50   MarkLive.cpp
51   OutputSections.cpp
52   Relocations.cpp
53   ScriptLexer.cpp
54   ScriptParser.cpp
55   SymbolTable.cpp
56   Symbols.cpp
57   SyntheticSections.cpp
58   Target.cpp
59   Thunks.cpp
60   Writer.cpp
62   LINK_COMPONENTS
63   ${LLVM_TARGETS_TO_BUILD}
64   BinaryFormat
65   BitWriter
66   Core
67   DebugInfoDWARF
68   Demangle
69   LTO
70   MC
71   Object
72   Option
73   Passes
74   Support
75   TargetParser
76   TransformUtils
78   LINK_LIBS
79   lldCommon
80   ${imported_libs}
81   ${LLVM_PTHREAD_LIB}
83   DEPENDS
84   ELFOptionsTableGen
85   intrinsics_gen
86   )