xref: /freebsd/usr.bin/clang/Makefile (revision 3c4ba5f55438f7afd4f4b0b56f88f2bb505fd6a6)
1# $FreeBSD$
2
3.include <src.opts.mk>
4
5.if ${MK_CLANG} != "no"
6SUBDIR+=	clang
7.endif
8
9.if !defined(TOOLS_PREFIX)
10# LLVM binutils are needed to support features such as LTO, so we build them
11# by default if clang is enabled. If MK_LLVM_BINUTILS is set, we also use them
12# as the default binutils (ar,nm,addr2line, etc.).
13.if ${MK_CLANG} != "no" || ${MK_LLVM_BINUTILS} != "no"
14SUBDIR+=	llvm-ar
15SUBDIR+=	llvm-nm
16SUBDIR+=	llvm-objcopy
17SUBDIR+=	llvm-objdump
18SUBDIR+=	llvm-readobj
19SUBDIR+=	llvm-size
20SUBDIR+=	llvm-strings
21SUBDIR+=	llvm-symbolizer
22.endif
23
24.if ${MK_LLVM_BINUTILS} != "no" || ${MK_LLVM_CXXFILT} != "no"
25SUBDIR+=	llvm-cxxfilt
26.endif
27
28.if ${MK_CLANG_EXTRAS} != "no"
29SUBDIR+=	bugpoint
30SUBDIR+=	llc
31SUBDIR+=	lli
32SUBDIR+=	llvm-as
33SUBDIR+=	llvm-bcanalyzer
34SUBDIR+=	llvm-cxxdump
35SUBDIR+=	llvm-diff
36SUBDIR+=	llvm-dis
37SUBDIR+=	llvm-dwarfdump
38SUBDIR+=	llvm-dwarfutil
39SUBDIR+=	llvm-dwp
40SUBDIR+=	llvm-extract
41SUBDIR+=	llvm-link
42SUBDIR+=	llvm-lto
43SUBDIR+=	llvm-lto2
44SUBDIR+=	llvm-mc
45SUBDIR+=	llvm-mca
46SUBDIR+=	llvm-modextract
47SUBDIR+=	llvm-pdbutil
48SUBDIR+=	llvm-rtdyld
49SUBDIR+=	llvm-xray
50SUBDIR+=	opt
51.endif
52
53.if ${MK_CLANG_EXTRAS} != "no" || ${MK_CLANG_FORMAT} != "no"
54SUBDIR+=	clang-format
55.endif
56
57.if ${MK_LLD} != "no"
58SUBDIR+=	lld
59.endif
60.if ${MK_LLDB} != "no"
61SUBDIR+=	lldb
62SUBDIR+=	lldb-server
63.endif
64.if ${MK_LLVM_COV} != "no"
65SUBDIR+=	llvm-cov
66SUBDIR+=	llvm-profdata
67.endif
68.endif # TOOLS_PREFIX
69
70SUBDIR_PARALLEL=
71
72.include <bsd.subdir.mk>
73