svn commit: r329093 - in head: lib/clang/libllvm share/mk tools/build/options usr.bin/clang
Ed Maste
emaste at FreeBSD.org
Sat Feb 10 00:22:37 UTC 2018
Author: emaste
Date: Sat Feb 10 00:22:35 2018
New Revision: 329093
URL: https://svnweb.freebsd.org/changeset/base/329093
Log:
Promote llvm-cov to a standalone option
Introduce WITH_/WITHOUT_LLVM_COV to match GCC's WITH_/WITHOUT_GCOV.
It is intended to provide a superset of the interface and functionality
of gcov.
It is enabled by default when building Clang, similarly to gcov and GCC.
This change moves one file in libllvm to be compiled unconditionally.
Previously it was included only when WITH_CLANG_EXTRAS was set, but the
complexity of a new special case for (CLANG_EXTRAS | LLVM_COV) is not
worth avoiding a tiny increase in build time.
Reviewed by: dim, imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D142645
Added:
head/tools/build/options/WITHOUT_LLVM_COV (contents, props changed)
head/tools/build/options/WITH_LLVM_COV (contents, props changed)
Modified:
head/lib/clang/libllvm/Makefile
head/share/mk/src.opts.mk
head/usr.bin/clang/Makefile
Modified: head/lib/clang/libllvm/Makefile
==============================================================================
--- head/lib/clang/libllvm/Makefile Sat Feb 10 00:22:25 2018 (r329092)
+++ head/lib/clang/libllvm/Makefile Sat Feb 10 00:22:35 2018 (r329093)
@@ -664,7 +664,7 @@ SRCS_MIN+= Passes/PassBuilder.cpp
SRCS_MIN+= ProfileData/Coverage/CoverageMapping.cpp
SRCS_MIN+= ProfileData/Coverage/CoverageMappingReader.cpp
SRCS_MIN+= ProfileData/Coverage/CoverageMappingWriter.cpp
-SRCS_EXT+= ProfileData/GCOV.cpp
+SRCS_MIN+= ProfileData/GCOV.cpp
SRCS_MIN+= ProfileData/InstrProf.cpp
SRCS_MIN+= ProfileData/InstrProfReader.cpp
SRCS_MIN+= ProfileData/InstrProfWriter.cpp
Modified: head/share/mk/src.opts.mk
==============================================================================
--- head/share/mk/src.opts.mk Sat Feb 10 00:22:25 2018 (r329092)
+++ head/share/mk/src.opts.mk Sat Feb 10 00:22:35 2018 (r329093)
@@ -119,6 +119,7 @@ __DEFAULT_YES_OPTIONS = \
LIB32 \
LIBPTHREAD \
LIBTHR \
+ LLVM_COV \
LOCALES \
LOCATE \
LPR \
@@ -425,6 +426,7 @@ MK_LLDB:= no
.if ${MK_CLANG} == "no"
MK_CLANG_EXTRAS:= no
MK_CLANG_FULL:= no
+MK_LLVM_COV:= no
.endif
#
Added: head/tools/build/options/WITHOUT_LLVM_COV
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/tools/build/options/WITHOUT_LLVM_COV Sat Feb 10 00:22:35 2018 (r329093)
@@ -0,0 +1,4 @@
+.\" $FreeBSD$
+Set to not build the
+.Xr llvm-cov 1
+tool.
Added: head/tools/build/options/WITH_LLVM_COV
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/tools/build/options/WITH_LLVM_COV Sat Feb 10 00:22:35 2018 (r329093)
@@ -0,0 +1,4 @@
+.\" $FreeBSD$
+Set to build the
+.Xr llvm-cov 1
+tool.
Modified: head/usr.bin/clang/Makefile
==============================================================================
--- head/usr.bin/clang/Makefile Sat Feb 10 00:22:25 2018 (r329092)
+++ head/usr.bin/clang/Makefile Sat Feb 10 00:22:35 2018 (r329093)
@@ -17,7 +17,6 @@ SUBDIR+= lli
SUBDIR+= llvm-ar
SUBDIR+= llvm-as
SUBDIR+= llvm-bcanalyzer
-SUBDIR+= llvm-cov
SUBDIR+= llvm-cxxdump
SUBDIR+= llvm-cxxfilt
SUBDIR+= llvm-diff
@@ -44,7 +43,10 @@ SUBDIR+= lld
.endif
.if ${MK_LLDB} != "no"
SUBDIR+= lldb
-.endif # MK_LLDB
+.endif
+.if ${MK_LLVM_COV} != "no"
+SUBDIR+= llvm-cov
+.endif
.endif # TOOLS_PREFIX
SUBDIR_PARALLEL=
More information about the svn-src-head
mailing list