Skip to content

bpo-43166: Disable ceval.c optimizations for Windows debug builds again #32023

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 23, 2022
Merged
Show file tree
Hide file tree
Changes from 5 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
7 changes: 3 additions & 4 deletions Include/pyport.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,10 @@ typedef Py_ssize_t Py_ssize_clean_t;
*/

#if defined(_MSC_VER)
# if defined(PY_LOCAL_AGGRESSIVE)
# if defined(PY_LOCAL_AGGRESSIVE) && !defined(Py_DEBUG)
/* enable more aggressive optimization for MSVC */
/* active in both release and debug builds - see bpo-43271 */
# pragma optimize("gt", on)
#endif
/* MSBuild scripting is preferable to optimize pragmas in headers */
# endif
/* ignore warnings if the compiler decides not to inline a function */
# pragma warning(disable: 4710)
/* fastest possible local call under MSVC */
Expand Down
2 changes: 2 additions & 0 deletions PCbuild/_freeze_module.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,13 @@
<PreprocessorDefinitions>Py_NO_ENABLE_SHARED;Py_BUILD_CORE;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Optimization>Disabled</Optimization>
<WholeProgramOptimization>false</WholeProgramOptimization>
<InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<AdditionalDependencies>version.lib;ws2_32.lib;pathcch.lib;bcrypt.lib;%(AdditionalDependencies)</AdditionalDependencies>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<StackReserveSize>4000000</StackReserveSize>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion PCbuild/python.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<StackReserveSize>2000000</StackReserveSize>
<StackReserveSize Condition="$(Configuration) != 'Debug'">2000000</StackReserveSize>
<StackReserveSize Condition="$(Configuration) == 'Debug'">4000000</StackReserveSize>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/

/* enable more aggressive intra-module optimizations, where available */
/* affects both release and debug builds - see bpo-43271 */
#define PY_LOCAL_AGGRESSIVE

#include "Python.h"
Expand Down