diff options
author | Batuhan Taskaya <batuhanosmantaskaya@gmail.com> | 2020-05-18 17:42:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-18 17:42:10 (GMT) |
commit | 63b8e0cba3d43e53a8dd8878ee1443c8427f462d (patch) | |
tree | 7fc7f94d7ff2783ba72c319b3ec956c88a00c8e7 /PCbuild/regen.vcxproj | |
parent | 7b7a21bc4fd063b26a2d1882fddc458861497812 (diff) | |
download | cpython-63b8e0cba3d43e53a8dd8878ee1443c8427f462d.zip cpython-63b8e0cba3d43e53a8dd8878ee1443c8427f462d.tar.gz cpython-63b8e0cba3d43e53a8dd8878ee1443c8427f462d.tar.bz2 |
bpo-40528: Improve AST generation script to do builds simultaneously (GH-19968)
- Switch from getopt to argparse.
- Removed the limitation of not being able to produce both C and H simultaneously.
This will make it run faster since it parses the asdl definition once and uses the generated tree to generate both the header and the C source.
Diffstat (limited to 'PCbuild/regen.vcxproj')
-rw-r--r-- | PCbuild/regen.vcxproj | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/PCbuild/regen.vcxproj b/PCbuild/regen.vcxproj index c97536f..d46fb99 100644 --- a/PCbuild/regen.vcxproj +++ b/PCbuild/regen.vcxproj @@ -176,20 +176,15 @@ <Warning Text="Pegen updated. You will need to rebuild pythoncore to see the changes." Condition="'@(_UpdatedParse)' != ''" /> </Target> <Target Name="_RegenAST_H" AfterTargets="_RegenGrammar"> - <!-- Regenerate Include/Python-ast.h using Parser/asdl_c.py -h --> - <Exec Command=""$(PythonExe)" "$(PySourcePath)Parser\asdl_c.py" -h "$(IntDir)Python-ast.h" "$(PySourcePath)Parser\Python.asdl"" /> + <!-- Regenerate Include/Python-ast.h and Python/Python-ast.c using Parser/asdl_c.py -h --> + <Exec Command=""$(PythonExe)" "$(PySourcePath)Parser\asdl_c.py" "$(PySourcePath)Parser\Python.asdl" -H "$(IntDir)Python-ast.h" -C "$(IntDir)Python-ast.c"" /> <Copy SourceFiles="$(IntDir)Python-ast.h" DestinationFiles="$(PySourcePath)Include\Python-ast.h"> <Output TaskParameter="CopiedFiles" ItemName="_UpdatedH" /> </Copy> - <Warning Text="Python-ast.h updated. You will need to rebuild pythoncore to see the changes." Condition="'@(_UpdatedH)' != '' and '@(_UpdatedC)' != ''" /> - </Target> - <Target Name="_RegenAST_C" AfterTargets="_RegenGrammar"> - <!-- Regenerate Python/Python-ast.c using Parser/asdl_c.py -c --> - <Exec Command=""$(PythonExe)" "$(PySourcePath)Parser\asdl_c.py" -c "$(IntDir)Python-ast.c" "$(PySourcePath)Parser\Python.asdl"" /> <Copy SourceFiles="$(IntDir)Python-ast.c" DestinationFiles="$(PySourcePath)Python\Python-ast.c"> - <Output TaskParameter="CopiedFiles" ItemName="_UpdatedH" /> + <Output TaskParameter="CopiedFiles" ItemName="_UpdatedC" /> </Copy> - <Warning Text="Python-ast.c updated. You will need to rebuild pythoncore to see the changes." Condition="'@(_UpdatedH)' != '' and '@(_UpdatedC)' != ''" /> + <Warning Text="ASDL is updated. You will need to rebuild pythoncore to see the changes." Condition="'@(_UpdatedH)' != '' and '@(_UpdatedC)' != ''" /> </Target> <Target Name="_RegenOpcodes" AfterTargets="_RegenAST_C"> <!-- Regenerate Include/opcode.h from Lib/opcode.py using Tools/scripts/generate_opcode_h.py--> |