freebsd-dev/lib/clang/clang.pre.mk
Dimitry Andric 8f391d9098 Rework {clang,lldb,llvm}-tblgen invocations to add --write-if-changed
This flag ensures that the tblgen tools do not actually touch the
produced .inc file, if there are no changes to the contents. In turn,
this may prevent a number of rebuilds of files that include such .inc
files, saving build time.

While here, ensure that the shell invocations to locate the used tblgen
binary do not show unnecessary error messages.

Reported by:	des
MFC after:	1 week
2023-03-29 19:49:49 +02:00

10 lines
216 B
Makefile

# $FreeBSD$
.include "llvm.pre.mk"
CLANG_SRCS= ${LLVM_BASE}/clang
CLANG_TBLGEN?= clang-tblgen
CLANG_TBLGEN_BIN!= which ${CLANG_TBLGEN} || echo __nonexistent_clang_tblgen__
CLANG_TBLGEN_OPTS?= --write-if-changed