svn commit: r345979 - in projects/runtime-coverage-v2: . share/mk
Enji Cooper
ngie at FreeBSD.org
Tue Sep 3 14:06:21 UTC 2019
Author: ngie
Date: Sat Apr 6 05:34:51 2019
New Revision: 345979
URL: https://svnweb.freebsd.org/changeset/base/345979
Log:
Build libclang_rt.profile as a cross-tools dependency
Long story short, make tinderbox was failing because it was looking for
libclang_rt.profile under a different path from there make libraries installs
it. Add a new MK knob to control building `lib/libclang_rt/profile` in
buildworld: MK_COVERAGE_SUPPORT. MK_COVERAGE_SUPPORT is to
`lib/libclang_rt/profile`, as MK_TESTS_SUPPORT is to lib/atf/...: it serves to
separate out building infrastructure from the resulting code.
This commit is untested, but I'm hopeful that it's a move in the right
direction.
Modified:
projects/runtime-coverage-v2/Makefile.inc1
projects/runtime-coverage-v2/share/mk/src.opts.mk
Modified: projects/runtime-coverage-v2/Makefile.inc1
==============================================================================
--- projects/runtime-coverage-v2/Makefile.inc1 Sat Apr 6 03:59:21 2019 (r345978)
+++ projects/runtime-coverage-v2/Makefile.inc1 Sat Apr 6 05:34:51 2019 (r345979)
@@ -688,7 +688,8 @@ BSARGS= DESTDIR= \
BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \
BWPHASE=${.TARGET:C,^_,,} \
SSP_CFLAGS= \
- MK_COVERAGE=no MK_HTML=no NO_LINT=yes MK_MAN=no \
+ 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 \
@@ -734,7 +735,8 @@ KTMAKE= \
MAKEOBJDIRPREFIX= \
BOOTSTRAPPING=${BOOTSTRAPPING_OSRELDATE} \
SSP_CFLAGS= \
- MK_COVERAGE=no MK_HTML=no -DNO_LINT MK_MAN=no \
+ 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
@@ -2463,7 +2465,10 @@ _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
@@ -2487,6 +2492,7 @@ cross-tools: .MAKE .PHONY
${_ar} \
${_clang_libs} \
${_clang} \
+ ${_coverage_libs} \
${_lld} \
${_binutils} \
${_elftctools} \
@@ -2720,7 +2726,7 @@ _prereq_libs+= gnu/lib/libssp/libssp_nonshared
# The coverage libraries must be built for the target prior to ${_startup_libs}
# for world to have runtime coverage instrumentation.
#
-.if ${MK_COVERAGE} != "no"
+.if ${MK_COVERAGE_SUPPORT} != "no"
_prereq_libs+= lib/libclang_rt/profile
.endif
@@ -3339,6 +3345,7 @@ XDEVDIRS= \
${_elftctools} \
usr.bin/ar \
${_clang} \
+ ${_coverage_libs} \
${_gcc}
_xb-cross-tools: .PHONY
Modified: projects/runtime-coverage-v2/share/mk/src.opts.mk
==============================================================================
--- projects/runtime-coverage-v2/share/mk/src.opts.mk Sat Apr 6 03:59:21 2019 (r345978)
+++ projects/runtime-coverage-v2/share/mk/src.opts.mk Sat Apr 6 05:34:51 2019 (r345979)
@@ -230,6 +230,7 @@ __DEFAULT_DEPENDENT_OPTIONS= \
.for var in \
BLACKLIST \
BZIP2 \
+ COVERAGE \
INET \
INET6 \
KERBEROS \
More information about the svn-src-projects
mailing list