classification
Title: "make coverage" should not leak coverage compiler flags to third party C extensions
Type: Stage:
Components: Build Versions: Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: vstinner
Priority: normal Keywords:

Created on 2018-12-14 18:47 by vstinner, last changed 2018-12-18 00:52 by vstinner.

Messages (1)
msg331850 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-12-14 18:47
"make coverage" modifies CFLAGS and LIBS, Makefile.pre.in:

coverage:
	@echo "Building with support for coverage checking:"
	$(MAKE) clean profile-removal
	$(MAKE) @DEF_MAKE_RULE@ CFLAGS="$(CFLAGS) -O0 -pg -fprofile-arcs -ftest-coverage" LIBS="$(LIBS) -lgcov"

CFLAGS_NODIST should be used instead here. I'm not sure about LIBS: do we need LIBS_NODIST, as we have CFLAGS_NODIST? LIBS_NODIST would be used for Python and C extensions of the stdlib, but not for third-party C extensions: not used by distutils.


See also bpo-35257: "Avoid leaking linker flags into distutils: add PY_LDFLAGS_NODIST".
History
Date User Action Args
2018-12-18 00:52:14vstinnersettitle: "make coverage" should use leak coverage flags to third party C extensions -> "make coverage" should not leak coverage compiler flags to third party C extensions
2018-12-14 18:47:02vstinnercreate