svn commit: r324900 - projects/runtime-coverage/share/mk
Ngie Cooper
ngie at FreeBSD.org
Mon Oct 23 05:19:42 UTC 2017
Author: ngie
Date: Mon Oct 23 05:19:40 2017
New Revision: 324900
URL: https://svnweb.freebsd.org/changeset/base/324900
Log:
Use -fprofile_dir=${COVERAGEDIR} with --coverage
This option implies that it will automatically prefix .gcda files, when
created, thus allowing for the desired prefixing I've added in via bsd.cov.mk .
This option is only available in clang and later versions of gcc, so I'll
likely have to mark MK_COVERAGE broken from a "fully-fledged feature"
perspective, as I don't want to go through the annoyance of implementing the
feature in gcc and testing it.
Modified:
projects/runtime-coverage/share/mk/bsd.lib.mk
projects/runtime-coverage/share/mk/bsd.prog.mk
Modified: projects/runtime-coverage/share/mk/bsd.lib.mk
==============================================================================
--- projects/runtime-coverage/share/mk/bsd.lib.mk Mon Oct 23 05:11:00 2017 (r324899)
+++ projects/runtime-coverage/share/mk/bsd.lib.mk Mon Oct 23 05:19:40 2017 (r324900)
@@ -76,7 +76,7 @@ CTFFLAGS+= -g
_WANTS_DEBUG=
.endif
.if ${MK_COVERAGE} != "no" && defined(_WANTS_DEBUG) && defined(SHLIB_NAME)
-_COV_FLAG= --coverage
+_COV_FLAG= --coverage -fprofile_dir=${COVERAGEDIR}
SHARED_CFLAGS+= ${_COV_FLAG}
SHARED_CXXFLAGS+= ${_COV_FLAG}
.endif
Modified: projects/runtime-coverage/share/mk/bsd.prog.mk
==============================================================================
--- projects/runtime-coverage/share/mk/bsd.prog.mk Mon Oct 23 05:11:00 2017 (r324899)
+++ projects/runtime-coverage/share/mk/bsd.prog.mk Mon Oct 23 05:19:40 2017 (r324900)
@@ -62,7 +62,7 @@ TAG_ARGS= -T ${TAGS:[*]:S/ /,/g}
LDFLAGS+= -static
.else
.if defined(_WANTS_DEBUG) && ${MK_COVERAGE} != "no"
-_COV_FLAG= --coverage
+_COV_FLAG= --coverage -fprofile_dir=${COVERAGEDIR}
CFLAGS+= ${_COV_FLAG}
CXXFLAGS+= ${_COV_FLAG}
.endif
More information about the svn-src-projects
mailing list