Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Use PlatformToolSet v145 by default when building with VS 2026
Furthermore, do not warn anymore when building with v145
  • Loading branch information
chris-eibl committed Feb 10, 2026
commit 839e029fad5709e1a15523b4ffb5c493e5009317
2 changes: 1 addition & 1 deletion PCbuild/python.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

We set BasePlatformToolset for ICC's benefit, it's otherwise ignored.
-->
<BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VisualStudioVersion)' == '18.0'">v143</BasePlatformToolset>
<BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VisualStudioVersion)' == '18.0'">v145</BasePlatformToolset>
<BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VisualStudioVersion)' == '17.0'">v143</BasePlatformToolset>
<BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VisualStudioVersion)' == '16.0'">v142</BasePlatformToolset>
<BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and ('$(MSBuildToolsVersion)' == '15.0' or '$(VisualStudioVersion)' == '15.0')">v141</BasePlatformToolset>
Expand Down
2 changes: 1 addition & 1 deletion PCbuild/pythoncore.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@
</ClCompile>
</ItemGroup>
</Target>
<Target Name="_WarnAboutToolset" BeforeTargets="PrepareForBuild" Condition="$(PlatformToolset) != 'v141' and $(PlatformToolset) != 'v142' and $(PlatformToolset) != 'v143'">
<Target Name="_WarnAboutToolset" BeforeTargets="PrepareForBuild" Condition="$(PlatformToolset) != 'v141' and $(PlatformToolset) != 'v142' and $(PlatformToolset) != 'v143' and $(PlatformToolset) != 'v145'">
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.

On main, shall we warn for older toolsets like v141 or v142 now?

Likewise, shall we keep a warning for v145 on 3.13 / 3.14?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The minimum VS version for building Python now is 2017.
https://docs.python.org/3.15/using/configure.html

I removed the support for 2015 a year ago #124103 . However, according to the Mainstream End Date of the VS lifecycle, currently only VS2022 is still supported

https://learn.microsoft.com/lifecycle/products/visual-studio-2019

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.

Yeah, let's start warning for those older ones.

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.

The minimum VS version for building Python now is 2017.
https://docs.python.org/3.15/using/configure.html

Maybe we should change that to 2022 since we emit a warning for the older ones now?

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.

It's not required though, whereas I'm pretty sure we made changes that prevent using the compilers that came with VS 2015. If you want to write something that's clearer about the "works with" toolset version, the "released/supported with" toolset versions, and the VS versions that typically include these toolsets (newer VS should have older MSVC available as options, but not selected by default), feel free.

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.

Ah, got it now, thanks for the explanation. So no need to change that from my point of view, until in the future we do a change that requires a newer version than VS 2017.

<Warning Text="Toolset $(PlatformToolset) is not used for official builds. Your build may have errors or incompatibilities." />
</Target>
<Target Name="_WarnAboutZlib" BeforeTargets="PrepareForBuild" Condition="!$(IncludeExternals)">
Expand Down