diff options
author | Victor Stinner <vstinner@python.org> | 2023-09-06 21:00:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-06 21:00:30 (GMT) |
commit | ed233ddc00afca0fd9affb119b21dd13b8b935fb (patch) | |
tree | b6babe21378b3eaed0515273def49e07d04c2c59 /Tools/scripts | |
parent | d631b823116793050fd0416c0ec877ea00cb47de (diff) | |
download | cpython-ed233ddc00afca0fd9affb119b21dd13b8b935fb.zip cpython-ed233ddc00afca0fd9affb119b21dd13b8b935fb.tar.gz cpython-ed233ddc00afca0fd9affb119b21dd13b8b935fb.tar.bz2 |
[3.11] gh-108740: Fix "make regen-all" race condition (#108741) (#109021)
gh-108740: Fix "make regen-all" race condition (#108741)
Fix a race condition in "make regen-all". The deepfreeze.c source and
files generated by Argument Clinic are now generated or updated
before generating "global objects". Previously, some identifiers may
miss depending on the order in which these files were generated.
* "make regen-global-objects": Make sure that deepfreeze.c is
generated and up to date, and always run "make clinic".
* "make regen-deepfreeze" now only updates deepfreeze.c (C file).
It doesn't build deepfreeze.o (object) anymore.
* Remove misleading messages in "make regen-global-objects" and
"make clinic". They are now outdated, these commands are now
safe to use.
Backport notes:
* Omit Doc/using/configure.rst changes.
* no need to change "make clinic", it didn't run
generate_global_objects.py script before.
Co-authored-by: Erlend E. Aasland <erlend@python.org>
(cherry picked from commit db1ee6a19ab62191c16ecb732cb4dcaede98a902)
Diffstat (limited to 'Tools/scripts')
-rw-r--r-- | Tools/scripts/freeze_modules.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Tools/scripts/freeze_modules.py b/Tools/scripts/freeze_modules.py index dd208c7..0e41d96 100644 --- a/Tools/scripts/freeze_modules.py +++ b/Tools/scripts/freeze_modules.py @@ -581,7 +581,7 @@ def regen_makefile(modules): pyfiles = [] frozenfiles = [] rules = [''] - deepfreezerules = ["Python/deepfreeze/deepfreeze.c: $(DEEPFREEZE_DEPS)", + deepfreezerules = ["$(DEEPFREEZE_C): $(DEEPFREEZE_DEPS)", "\t$(PYTHON_FOR_FREEZE) $(srcdir)/Tools/scripts/deepfreeze.py \\"] for src in _iter_sources(modules): frozen_header = relpath_for_posix_display(src.frozenfile, ROOT_DIR) |