Skip to content

Commit 15b0bf1

Browse files
committed
check tail-calling support in pythoncore.vcxproj
1 parent 6009309 commit 15b0bf1

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

PCbuild/pythoncore.vcxproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,4 +749,13 @@
749749
<Target Name="_DeletePyBuildDirTxt" BeforeTargets="PrepareForBuild">
750750
<Delete Files="$(OutDir)pybuilddir.txt" />
751751
</Target>
752+
753+
<Target Name="_CheckTailCalling" BeforeTargets="PrepareForBuild" Condition="'$(UseTailCallInterp)' == 'true' and $(PlatformToolset) != 'ClangCL'">
754+
<Error Text="MSVC supports tail-calling only for x64."
755+
Condition="$(Platform) != 'x64'" />
756+
<Error Text="Platform toolset >= v145 is required for tail-calling."
757+
Condition="$(PlatformToolset.Replace('v', '0')) &lt; '145'" />
758+
<Error Text="MSVC requires optimization to be enabled for tail-calling."
759+
Condition="$(Configuration) == 'Debug'" />
760+
</Target>
752761
</Project>

0 commit comments

Comments
 (0)