5 LLVM_SRCS= ${SRCTOP}/contrib/llvm
6 LLD_SRCS= ${LLVM_SRCS}/tools/lld
11 .if ${MK_LLD_IS_LD} != "no"
12 SYMLINKS= ${PROG_CXX} ${BINDIR}/ld
16 CFLAGS+= -I${LLD_SRCS}/ELF
17 CFLAGS+= -I${LLD_SRCS}/include
19 CFLAGS+= -I${OBJTOP}/lib/clang/libllvm
22 SRCS+= Common/Args.cpp
23 SRCS+= Common/ErrorHandler.cpp
24 SRCS+= Common/Memory.cpp
25 SRCS+= Common/Reproduce.cpp
26 SRCS+= Common/Strings.cpp
27 SRCS+= Common/TargetOptionsCommandFlags.cpp
28 SRCS+= Common/Threads.cpp
29 SRCS+= Common/Version.cpp
30 SRCS+= ELF/AArch64ErrataFix.cpp
31 SRCS+= ELF/Arch/AArch64.cpp
32 SRCS+= ELF/Arch/AMDGPU.cpp
33 SRCS+= ELF/Arch/ARM.cpp
34 SRCS+= ELF/Arch/AVR.cpp
35 SRCS+= ELF/Arch/Mips.cpp
36 SRCS+= ELF/Arch/MipsArchTree.cpp
37 SRCS+= ELF/Arch/PPC.cpp
38 SRCS+= ELF/Arch/PPC64.cpp
39 SRCS+= ELF/Arch/SPARCV9.cpp
40 SRCS+= ELF/Arch/X86.cpp
41 SRCS+= ELF/Arch/X86_64.cpp
43 SRCS+= ELF/DriverUtils.cpp
44 SRCS+= ELF/EhFrame.cpp
45 SRCS+= ELF/Filesystem.cpp
46 SRCS+= ELF/GdbIndex.cpp
48 SRCS+= ELF/InputFiles.cpp
49 SRCS+= ELF/InputSection.cpp
51 SRCS+= ELF/LinkerScript.cpp
52 SRCS+= ELF/MapFile.cpp
53 SRCS+= ELF/MarkLive.cpp
54 SRCS+= ELF/OutputSections.cpp
55 SRCS+= ELF/Relocations.cpp
56 SRCS+= ELF/ScriptLexer.cpp
57 SRCS+= ELF/ScriptParser.cpp
58 SRCS+= ELF/Strings.cpp
59 SRCS+= ELF/SymbolTable.cpp
60 SRCS+= ELF/Symbols.cpp
61 SRCS+= ELF/SyntheticSections.cpp
65 SRCS+= lib/Core/Error.cpp
66 SRCS+= lib/Core/File.cpp
67 SRCS+= lib/Core/LinkingContext.cpp
68 SRCS+= lib/Core/Reader.cpp
69 SRCS+= lib/Core/Resolver.cpp
70 SRCS+= lib/Core/SymbolTable.cpp
71 SRCS+= tools/lld/lld.cpp
73 .include "${SRCTOP}/lib/clang/llvm.build.mk"
77 .for lib in ${LIBDEPS}
78 DPADD+= ${OBJTOP}/lib/clang/lib${lib}/lib${lib}.a
79 LDADD+= ${OBJTOP}/lib/clang/lib${lib}/lib${lib}.a
82 LLVM_TBLGEN?= llvm-tblgen
83 ELF/Options.inc: ${LLD_SRCS}/ELF/Options.td
84 ${LLVM_TBLGEN} -gen-opt-parser-defs \
85 -I ${LLVM_SRCS}/include \
86 -d ${.TARGET:C/$/.d/} -o ${.TARGET} \
87 ${LLVM_SRCS}/tools/lld/ELF/Options.td
88 TGHDRS+= ELF/Options.inc
91 CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}
97 .include <bsd.prog.mk>