xref: /freebsd/usr.bin/clang/Makefile (revision f7c32ed617858bcd22f8d1b03199099d50125721)
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-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