Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Sep 2019 14:06:36 -0000
From:      Enji Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r346071 - projects/runtime-coverage-v2
Message-ID:  <201904100623.x3A6NFeh001880@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Wed Apr 10 06:23:15 2019
New Revision: 346071
URL: https://svnweb.freebsd.org/changeset/base/346071

Log:
  r345979 didn't yield fruit
  
  Try taking a different approach by compiling coverage support into the
  libraries, after the fact, like building tests.

Modified:
  projects/runtime-coverage-v2/Makefile.inc1

Modified: projects/runtime-coverage-v2/Makefile.inc1
==============================================================================
--- projects/runtime-coverage-v2/Makefile.inc1	Tue Apr  9 22:20:11 2019	(r346070)
+++ projects/runtime-coverage-v2/Makefile.inc1	Wed Apr 10 06:23:15 2019	(r346071)
@@ -688,12 +688,12 @@ BSARGS= 	DESTDIR= \
 		BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \
 		BWPHASE=${.TARGET:C,^_,,} \
 		SSP_CFLAGS= \
-		MK_COVERAGE=no MK_COVERAGE_SUPPORT=${MK_COVERAGE} \
 		MK_HTML=no NO_LINT=yes MK_MAN=no \
 		-DNO_PIC MK_PROFILE=no -DNO_SHARED \
 		-DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \
 		MK_CLANG_EXTRAS=no MK_CLANG_FULL=no \
-		MK_LLDB=no MK_RETPOLINE=no MK_TESTS=no \
+		MK_LLDB=no MK_RETPOLINE=no \
+		MK_TESTS=no MK_COVERAGE=no \
 		MK_INCLUDES=yes
 
 BMAKE=		\
@@ -714,13 +714,15 @@ TMAKE=		\
 		-DNO_LINT \
 		-DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \
 		MK_CLANG_EXTRAS=no MK_CLANG_FULL=no \
-		MK_LLDB=no MK_RETPOLINE=no MK_TESTS=no
+		MK_LLDB=no MK_RETPOLINE=no \
+		MK_TESTS=no MK_COVERAGE=no
 
 # cross-tools stage
 # TOOLS_PREFIX set in BMAKE
 XMAKE=		${BMAKE} \
 		TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
-		MK_GDB=no MK_TESTS=no
+		MK_GDB=no \
+		MK_TESTS=no MK_COVERAGE=no
 
 # kernel-tools stage
 KTMAKEENV=	INSTALL="sh ${.CURDIR}/tools/install.sh" \
@@ -735,7 +737,6 @@ KTMAKE=		\
 		MAKEOBJDIRPREFIX= \
 		BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \
 		SSP_CFLAGS= \
-		MK_COVERAGE=no MK_COVERAGE_SUPPORT=${MK_COVERAGE} \
 		MK_HTML=no -DNO_LINT MK_MAN=no \
 		-DNO_PIC MK_PROFILE=no -DNO_SHARED \
 		-DNO_CPU_CFLAGS MK_RETPOLINE=no MK_WARNS=no MK_CTF=no
@@ -1115,7 +1116,9 @@ _libraries:
 	@echo "--------------------------------------------------------------"
 	${_+_}cd ${.CURDIR}; \
 	    ${WMAKE} -DNO_FSCHG MK_HTML=no -DNO_LINT MK_MAN=no \
-	    MK_PROFILE=no MK_TESTS=no MK_TESTS_SUPPORT=${MK_TESTS} libraries
+	    MK_PROFILE=no MK_TESTS=no MK_TESTS_SUPPORT=${MK_TESTS} \
+	    MK_COVERAGE=no MK_COVERAGE_SUPPORT=${MK_COVERAGE} \
+	    libraries
 everything: .PHONY
 	@echo
 	@echo "--------------------------------------------------------------"
@@ -2465,10 +2468,7 @@ _elftctools=	lib/libelftc \
 
 .if ${MK_CLANG_BOOTSTRAP} != "no"
 _clang=		usr.bin/clang
-.if ${MK_COVERAGE_SUPPORT} != "no"
-_coverage_libs=	lib/libclang_rt/profile
 .endif
-.endif
 .if ${MK_LLD_BOOTSTRAP} != "no"
 _lld=		usr.bin/clang/lld
 .endif
@@ -2492,7 +2492,6 @@ cross-tools: .MAKE .PHONY
     ${_ar} \
     ${_clang_libs} \
     ${_clang} \
-    ${_coverage_libs} \
     ${_lld} \
     ${_binutils} \
     ${_elftctools} \
@@ -2976,7 +2975,7 @@ ${_lib}__PL: .PHONY .MAKE
 	${_+_}@${ECHODIR} "===> ${_lib} (obj,all,install)"; \
 		cd ${.CURDIR}/${_lib}; \
 		if [ -z "${NO_OBJWALK}" ]; then ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; fi; \
-		${MAKE} MK_TESTS=no MK_PROFILE=no -DNO_PIC \
+		${MAKE} MK_COVERAGE=no MK_TESTS=no MK_PROFILE=no -DNO_PIC \
 		    DIRPRFX=${_lib}/ all; \
 		${MAKE} MK_COVERAGE=no MK_TESTS=no MK_PROFILE=no -DNO_PIC \
 		    DIRPRFX=${_lib}/ install
@@ -2989,7 +2988,7 @@ ${_lib}__L: .PHONY .MAKE
 	${_+_}@${ECHODIR} "===> ${_lib} (obj,all,install)"; \
 		cd ${.CURDIR}/${_lib}; \
 		if [ -z "${NO_OBJWALK}" ]; then ${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ obj; fi; \
-		${MAKE} MK_TESTS=no DIRPRFX=${_lib}/ all; \
+		${MAKE} MK_COVERAGE=no MK_TESTS=no DIRPRFX=${_lib}/ all; \
 		${MAKE} MK_COVERAGE=no MK_TESTS=no DIRPRFX=${_lib}/ install
 .endif
 .endfor
@@ -3257,9 +3256,10 @@ XDEV_CPUTYPE?=${CPUTYPE}
 XDEV_CPUTYPE?=${TARGET_CPUTYPE}
 .endif
 
-NOFUN=	MK_COVERAGE=no -DNO_FSCHG MK_HTML=no -DNO_LINT \
+NOFUN=	-DNO_FSCHG MK_HTML=no -DNO_LINT \
 	MK_MAN=no MK_NLS=no MK_PROFILE=no \
 	MK_KERBEROS=no MK_RESCUE=no MK_TESTS=no MK_WARNS=no \
+	MK_COVERAGE=no \
 	TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \
 	CPUTYPE=${XDEV_CPUTYPE}
 
@@ -3345,7 +3345,6 @@ XDEVDIRS= \
     ${_elftctools} \
     usr.bin/ar \
     ${_clang} \
-    ${_coverage_libs} \
     ${_gcc}
 
 _xb-cross-tools: .PHONY





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904100623.x3A6NFeh001880>