svn commit: r324440 - projects/runtime-coverage

Ngie Cooper ngie at FreeBSD.org
Mon Oct 9 16:27:33 UTC 2017


Author: ngie
Date: Mon Oct  9 16:27:31 2017
New Revision: 324440
URL: https://svnweb.freebsd.org/changeset/base/324440

Log:
  First attempt at adding coverage libraries for gcc-only platforms
  
  gnu/lib/libgcov is needed for gcc --coverage , whereas libprofile-rt is
  required for clang --coverage .
  
  Adopt a pattern similar to SUBDIR.yes for handling both the clang and gcc cases.

Modified:
  projects/runtime-coverage/Makefile.inc1

Modified: projects/runtime-coverage/Makefile.inc1
==============================================================================
--- projects/runtime-coverage/Makefile.inc1	Mon Oct  9 16:20:39 2017	(r324439)
+++ projects/runtime-coverage/Makefile.inc1	Mon Oct  9 16:27:31 2017	(r324440)
@@ -2080,11 +2080,11 @@ _lld=		usr.bin/clang/lld
 .if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_LLD_BOOTSTRAP} != "no"
 _clang_libs=	lib/clang
 .endif
+
 .if ${MK_COVERAGE_SUPPORT} != "no"
-.if ${MK_CLANG} != "no"
-_coverage_libs= lib/libclang_rt/profile
+_coverage_libs.${MK_CLANG}+=	lib/libclang_rt/profile
+_coverage_lib.${MK_GCC}+=	gnu/lib/libgcov
 .endif
-.endif
 
 .if ${MK_GCC_BOOTSTRAP} != "no"
 _gcc=		gnu/usr.bin/cc
@@ -2097,7 +2097,7 @@ cross-tools: .MAKE .PHONY
 .for _tool in \
     ${LOCAL_XTOOL_DIRS} \
     ${_clang_libs} \
-    ${_coverage_libs} \
+    ${_coverage_libs.yes} \
     ${_clang} \
     ${_lld} \
     ${_binutils} \


More information about the svn-src-projects mailing list