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
15 CFLAGS+= -I${LLD_SRCS}/include
17 CFLAGS+= -I${OBJTOP}/lib/clang/libllvm
21 SRCS+= ELF/DriverUtils.cpp
22 SRCS+= ELF/EhFrame.cpp
24 SRCS+= ELF/GdbIndex.cpp
26 SRCS+= ELF/InputFiles.cpp
27 SRCS+= ELF/InputSection.cpp
28 SRCS+= ELF/LinkerScript.cpp
30 SRCS+= ELF/MarkLive.cpp
32 SRCS+= ELF/OutputSections.cpp
33 SRCS+= ELF/Relocations.cpp
34 SRCS+= ELF/ScriptParser.cpp
35 SRCS+= ELF/Strings.cpp
36 SRCS+= ELF/SymbolTable.cpp
37 SRCS+= ELF/Symbols.cpp
38 SRCS+= ELF/SyntheticSections.cpp
42 SRCS+= lib/Config/Version.cpp
43 SRCS+= lib/Core/DefinedAtom.cpp
44 SRCS+= lib/Core/Error.cpp
45 SRCS+= lib/Core/File.cpp
46 SRCS+= lib/Core/LinkingContext.cpp
47 SRCS+= lib/Core/Reader.cpp
48 SRCS+= lib/Core/Reproduce.cpp
49 SRCS+= lib/Core/Resolver.cpp
50 SRCS+= lib/Core/SymbolTable.cpp
51 SRCS+= lib/Core/Writer.cpp
52 SRCS+= tools/lld/lld.cpp
54 .include "${SRCTOP}/lib/clang/llvm.build.mk"
58 .for lib in ${LIBDEPS}
59 DPADD+= ${OBJTOP}/lib/clang/lib${lib}/lib${lib}.a
60 LDADD+= ${OBJTOP}/lib/clang/lib${lib}/lib${lib}.a
63 LLVM_TBLGEN?= llvm-tblgen
64 ELF/Options.inc: ${LLD_SRCS}/ELF/Options.td
65 ${LLVM_TBLGEN} -gen-opt-parser-defs \
66 -I ${LLVM_SRCS}/include \
67 -d ${.TARGET:C/$/.d/} -o ${.TARGET} \
68 ${LLVM_SRCS}/tools/lld/ELF/Options.td
69 TGHDRS+= ELF/Options.inc
72 CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}
78 .include <bsd.prog.mk>