]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
closes bpo-39575: Change -lgcov to --coverage. (GH-18382)
authorFangrui Song <i@maskray.me>
Fri, 7 Feb 2020 23:46:29 +0000 (15:46 -0800)
committerGitHub <noreply@github.com>
Fri, 7 Feb 2020 23:46:29 +0000 (15:46 -0800)
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

Makefile.pre.in

index 510f227ed4df3a37d8a2da8fb8573488af5e7336..3da104bac87d05e1e9b69f1b3047fa53f3f73aee 100644 (file)
@@ -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:"