xref: /openbsd-src/gnu/llvm/lld/MachO/CMakeLists.txt (revision dfe94b169149f14cc1aee2cf6dad58a8d9a1860c)
1set(LLVM_TARGET_DEFINITIONS Options.td)
2tablegen(LLVM Options.inc -gen-opt-parser-defs)
3add_public_tablegen_target(MachOOptionsTableGen)
4
5include_directories(${LLVM_MAIN_SRC_DIR}/../libunwind/include)
6
7add_lld_library(lldMachO
8  Arch/ARM.cpp
9  Arch/ARM64.cpp
10  Arch/ARM64Common.cpp
11  Arch/ARM64_32.cpp
12  Arch/X86_64.cpp
13  ConcatOutputSection.cpp
14  Driver.cpp
15  DriverUtils.cpp
16  Dwarf.cpp
17  EhFrame.cpp
18  ExportTrie.cpp
19  ICF.cpp
20  InputFiles.cpp
21  InputSection.cpp
22  LTO.cpp
23  MapFile.cpp
24  MarkLive.cpp
25  ObjC.cpp
26  OutputSection.cpp
27  OutputSegment.cpp
28  Relocations.cpp
29  SectionPriorities.cpp
30  SymbolTable.cpp
31  Symbols.cpp
32  SyntheticSections.cpp
33  Target.cpp
34  UnwindInfoSection.cpp
35  Writer.cpp
36
37  LINK_COMPONENTS
38  ${LLVM_TARGETS_TO_BUILD}
39  BinaryFormat
40  BitReader
41  BitWriter
42  Core
43  DebugInfoDWARF
44  Demangle
45  LTO
46  MC
47  ObjCARCOpts
48  Object
49  Option
50  Passes
51  Support
52  TargetParser
53  TextAPI
54
55  LINK_LIBS
56  lldCommon
57  ${LLVM_PTHREAD_LIB}
58  ${XAR_LIB}
59
60  DEPENDS
61  MachOOptionsTableGen
62  ${tablegen_deps}
63  )
64
65if(LLVM_HAVE_LIBXAR)
66  target_link_libraries(lldMachO PRIVATE ${XAR_LIB})
67endif()
68