diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 34238606ea61..45b0a27865f8 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -2461,7 +2461,7 @@ OLD_FILES+=usr/share/man/man1/gperf.1.gz OLD_FILES+=usr/share/man/man1/gperf.7.gz .endif -.if ${MK_GCC} == no || ${MK_GCOV} == no +.if (${MK_GCOV} == no || ${MK_GCC} == no) && ${MK_LLVM_COV} == no OLD_FILES+=usr/bin/gcov OLD_FILES+=usr/share/man/man1/gcov.1.gz .endif diff --git a/usr.bin/clang/llvm-cov/Makefile b/usr.bin/clang/llvm-cov/Makefile index 1e82699c41c5..d91079f26939 100644 --- a/usr.bin/clang/llvm-cov/Makefile +++ b/usr.bin/clang/llvm-cov/Makefile @@ -1,6 +1,12 @@ # $FreeBSD$ +.include + PROG_CXX= llvm-cov +.if ${MK_GCOV} == "no" +LINKS= ${BINDIR}/llvm-cov ${BINDIR}/gcov +MLINKS= llvm-cov.1 gcov.1 +.endif SRCDIR= tools/llvm-cov SRCS+= CodeCoverage.cpp