Skip to content

Commit

Permalink
bpo-44131: Fix Makefile for test_frozenmain (GH-26203)
Browse files Browse the repository at this point in the history
Remove Programs/test_frozenmain.h Makefile target: it ran make
in parallel which caused build errors on LTO+PGO builds.
  • Loading branch information
vstinner committed May 18, 2021
1 parent eaede0d commit 834498e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 1 addition & 3 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -720,15 +720,13 @@ Makefile Modules/config.c: Makefile.pre \
@mv config.c Modules
@echo "The Makefile was updated, you may need to re-run make."

.PHONY: regen-test-frozenmain
regen-test-frozenmain: $(BUILDPYTHON)
# Regenerate Programs/test_frozenmain.h
# from Programs/test_frozenmain.py
# using Programs/freeze_test_frozenmain.py
$(RUNSHARED) ./$(BUILDPYTHON) Programs/freeze_test_frozenmain.py Programs/test_frozenmain.h

Programs/test_frozenmain.h: Programs/freeze_test_frozenmain.py Programs/test_frozenmain.py
$(MAKE) regen-test-frozenmain

Programs/_testembed: Programs/_testembed.o $(LIBRARY_DEPS)
$(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)

Expand Down
2 changes: 1 addition & 1 deletion Programs/test_frozenmain.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Programs/test_frozenmain.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Script used to test Py_FrozenMain(): see test_embed.test_frozenmain().
# Run "make regen-test-frozenmain" if you modify this test.

import sys
import _testinternalcapi

Expand Down

0 comments on commit 834498e

Please sign in to comment.