summaryrefslogtreecommitdiffstats
path: root/PCbuild/regen.vcxproj
diff options
context:
space:
mode:
authorBatuhan Taskaya <batuhanosmantaskaya@gmail.com>2020-05-18 17:42:10 (GMT)
committerGitHub <noreply@github.com>2020-05-18 17:42:10 (GMT)
commit63b8e0cba3d43e53a8dd8878ee1443c8427f462d (patch)
tree7fc7f94d7ff2783ba72c319b3ec956c88a00c8e7 /PCbuild/regen.vcxproj
parent7b7a21bc4fd063b26a2d1882fddc458861497812 (diff)
downloadcpython-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.vcxproj13
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="&quot;$(PythonExe)&quot; &quot;$(PySourcePath)Parser\asdl_c.py&quot; -h &quot;$(IntDir)Python-ast.h&quot; &quot;$(PySourcePath)Parser\Python.asdl&quot;" />
+ <!-- Regenerate Include/Python-ast.h and Python/Python-ast.c using Parser/asdl_c.py -h -->
+ <Exec Command="&quot;$(PythonExe)&quot; &quot;$(PySourcePath)Parser\asdl_c.py&quot; &quot;$(PySourcePath)Parser\Python.asdl&quot; -H &quot;$(IntDir)Python-ast.h&quot; -C &quot;$(IntDir)Python-ast.c&quot;" />
<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="&quot;$(PythonExe)&quot; &quot;$(PySourcePath)Parser\asdl_c.py&quot; -c &quot;$(IntDir)Python-ast.c&quot; &quot;$(PySourcePath)Parser\Python.asdl&quot;" />
<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-->