gh-130039: Tailcall for windows builds by Fidget-Spinner · Pull Request #130040 · python/cpython · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions .github/workflows/tail-call.yml
2 changes: 1 addition & 1 deletion Include/internal/pycore_debug_offsets.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ extern "C" {
declaration \
_GENERATE_DEBUG_SECTION_LINUX(name)

#if defined(MS_WINDOWS)
#if defined(MS_WINDOWS) && !defined(__clang__)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need an alternate definition for Windows + clang?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, below there's a default that it uses is we're not one of the supported platforms. And that default works for Clang Windows.

#define _GENERATE_DEBUG_SECTION_WINDOWS(name) \
_Pragma(Py_STRINGIFY(section(Py_STRINGIFY(name), read, write))) \
__declspec(allocate(Py_STRINGIFY(name)))
Expand Down
3 changes: 3 additions & 0 deletions PCbuild/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ echo. --experimental-jit Enable the experimental just-in-time compiler
echo. --experimental-jit-off Ditto but off by default (PYTHON_JIT=1 enables).
echo. --experimental-jit-interpreter Enable the experimental Tier 2 interpreter.
echo. --pystats Enable PyStats collection.
echo. --tail-call-interp Enable tail-calling interpreter (requires LLVM 19 or higher).
echo.
echo.Available flags to avoid building certain modules.
echo.These flags have no effect if '-e' is not given:
Expand Down Expand Up @@ -95,6 +96,7 @@ if "%~1"=="--experimental-jit-off" (set UseJIT=true) & (set UseTIER2=3) & shift
if "%~1"=="--experimental-jit-interpreter" (set UseTIER2=4) & shift & goto CheckOpts
if "%~1"=="--experimental-jit-interpreter-off" (set UseTIER2=6) & shift & goto CheckOpts
if "%~1"=="--pystats" (set PyStats=1) & shift & goto CheckOpts
if "%~1"=="--tail-call-interp" (set UseTailCallInterp=true) & shift & goto CheckOpts
rem These use the actual property names used by MSBuild. We could just let
rem them in through the environment, but we specify them on the command line
rem anyway for visibility so set defaults after this
Expand Down Expand Up @@ -189,6 +191,7 @@ echo on
/p:UseJIT=%UseJIT%^
/p:UseTIER2=%UseTIER2%^
/p:PyStats=%PyStats%^
/p:UseTailCallInterp=%UseTailCallInterp%^
%1 %2 %3 %4 %5 %6 %7 %8 %9

@echo off
Expand Down
1 change: 1 addition & 0 deletions PCbuild/pythoncore.vcxproj