Skip to content

Commit ab0a611

Browse files
Tail-calling flag for Window
1 parent 469d2e4 commit ab0a611

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

PCbuild/build.bat

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ echo. --experimental-jit Enable the experimental just-in-time compiler
4040
echo. --experimental-jit-off Ditto but off by default (PYTHON_JIT=1 enables).
4141
echo. --experimental-jit-interpreter Enable the experimental Tier 2 interpreter.
4242
echo. --pystats Enable PyStats collection.
43+
echo. --tail-call-interp Enable tail-calling interpreter.
4344
echo.
4445
echo.Available flags to avoid building certain modules.
4546
echo.These flags have no effect if '-e' is not given:
@@ -95,6 +96,7 @@ if "%~1"=="--experimental-jit-off" (set UseJIT=true) & (set UseTIER2=3) & shift
9596
if "%~1"=="--experimental-jit-interpreter" (set UseTIER2=4) & shift & goto CheckOpts
9697
if "%~1"=="--experimental-jit-interpreter-off" (set UseTIER2=6) & shift & goto CheckOpts
9798
if "%~1"=="--pystats" (set PyStats=1) & shift & goto CheckOpts
99+
if "%~1"=="--tail-call-interp" (set UseTailCallInterp=true) & shift & goto CheckOpts
98100
rem These use the actual property names used by MSBuild. We could just let
99101
rem them in through the environment, but we specify them on the command line
100102
rem anyway for visibility so set defaults after this
@@ -189,6 +191,7 @@ echo on
189191
/p:UseJIT=%UseJIT%^
190192
/p:UseTIER2=%UseTIER2%^
191193
/p:PyStats=%PyStats%^
194+
/p:UseTailCallInterp=%UseTailCallInterp%^
192195
%1 %2 %3 %4 %5 %6 %7 %8 %9
193196

194197
@echo off

PCbuild/pythoncore.vcxproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,9 @@
703703
<PropertyGroup Condition="$(DisableGil) == 'true'">
704704
<PyConfigHText>$(PyConfigHText.Replace('/* #define Py_GIL_DISABLED 1 */', '#define Py_GIL_DISABLED 1'))</PyConfigHText>
705705
</PropertyGroup>
706+
<PropertyGroup Condition="$(UseTailCallInterp) == 'true'">
707+
<PyConfigHText>$(PyConfigHText.Replace('/* #define Py_TAIL_CALL_INTERP 1 */', '#define Py_TAIL_CALL_INTERP 1'))</PyConfigHText>
708+
</PropertyGroup>
706709
<Message Text="Updating pyconfig.h" Condition="$(PyConfigHText.TrimEnd()) != $(OldPyConfigH.TrimEnd())" />
707710
<WriteLinesToFile File="$(IntDir)pyconfig.h"
708711
Lines="$(PyConfigHText)"

0 commit comments

Comments
 (0)