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