bpo-44131: Fix Makefile for test_frozenmain (GH-26203)

Remove Programs/test_frozenmain.h Makefile target: it ran make
in parallel which caused build errors on LTO+PGO builds.
This commit is contained in:
Victor Stinner 2021-05-18 08:40:37 +02:00 committed by GitHub
parent eaede0ded7
commit 834498e178
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -720,15 +720,13 @@ Makefile Modules/config.c: Makefile.pre \
@mv config.c Modules @mv config.c Modules
@echo "The Makefile was updated, you may need to re-run make." @echo "The Makefile was updated, you may need to re-run make."
.PHONY: regen-test-frozenmain
regen-test-frozenmain: $(BUILDPYTHON) regen-test-frozenmain: $(BUILDPYTHON)
# Regenerate Programs/test_frozenmain.h # Regenerate Programs/test_frozenmain.h
# from Programs/test_frozenmain.py # from Programs/test_frozenmain.py
# using Programs/freeze_test_frozenmain.py # using Programs/freeze_test_frozenmain.py
$(RUNSHARED) ./$(BUILDPYTHON) Programs/freeze_test_frozenmain.py Programs/test_frozenmain.h $(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) Programs/_testembed: Programs/_testembed.o $(LIBRARY_DEPS)
$(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LINKCC) $(PY_CORE_LDFLAGS) $(LINKFORSHARED) -o $@ Programs/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS)

View File

@ -25,6 +25,6 @@ unsigned char M_test_frozenmain[] = {
169,0,114,7,0,0,0,114,7,0,0,0,250,18,116,101, 169,0,114,7,0,0,0,114,7,0,0,0,250,18,116,101,
115,116,95,102,114,111,122,101,110,109,97,105,110,46,112,121, 115,116,95,102,114,111,122,101,110,109,97,105,110,46,112,121,
218,8,60,109,111,100,117,108,101,62,1,0,0,0,115,16, 218,8,60,109,111,100,117,108,101,62,1,0,0,0,115,16,
0,0,0,8,0,8,1,8,2,12,1,12,1,18,1,18, 0,0,0,8,3,8,1,8,2,12,1,12,1,18,1,18,
1,22,1,243,0,0,0,0, 1,22,1,243,0,0,0,0,
}; };

View File

@ -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 sys
import _testinternalcapi import _testinternalcapi