[Python-checkins] closes bpo-39575: Change -lgcov to --coverage. (GH-18382)
Fangrui Song
webhook-mailer at python.org
Fri Feb 7 18:46:34 EST 2020
https://github.com/python/cpython/commit/9a978ddb93bf5eaa519916d9a40c4fa4edf5d854
commit: 9a978ddb93bf5eaa519916d9a40c4fa4edf5d854
branch: master
author: Fangrui Song <i at maskray.me>
committer: GitHub <noreply at github.com>
date: 2020-02-07T15:46:29-08:00
summary:
closes bpo-39575: Change -lgcov to --coverage. (GH-18382)
This allows clang to get rid of the dependency on libgcov.
When linking, GCC passes -lgcov while clang passes the path to libclang_rt.profile-$arch.a
files:
M Makefile.pre.in
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 510f227ed4df3..3da104bac87d0 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -513,7 +513,7 @@ profile-opt: profile-run-stamp
coverage:
@echo "Building with support for coverage checking:"
$(MAKE) clean
- $(MAKE) @DEF_MAKE_RULE@ CFLAGS="$(CFLAGS) -O0 -pg -fprofile-arcs -ftest-coverage" LIBS="$(LIBS) -lgcov"
+ $(MAKE) @DEF_MAKE_RULE@ CFLAGS="$(CFLAGS) -O0 -pg --coverage" LIBS="$(LIBS) --coverage"
coverage-lcov:
@echo "Creating Coverage HTML report with LCOV:"
More information about the Python-checkins
mailing list