Skip to content

Commit a05bef4

Browse files
authored
bpo-35059, PCbuild: Expand inline funcs in Debug (GH-10094)
Visual Studio solution: Set InlineFunctionExpansion to OnlyExplicitInline ("/Ob1" option) on all projects (in pyproject.props) in Debug mode on Win32 and x64 platforms to expand functions marked as inline. This change should make Python compiled in Debug mode a little bit faster on Windows. On Unix, GCC uses -Og optimization level for ./configure --with-pydebug.
1 parent b4435e2 commit a05bef4

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
PCbuild: Set InlineFunctionExpansion to OnlyExplicitInline ("/Ob1" option)
2+
in pyproject.props in Debug mode to expand functions marked as inline. This
3+
change should make Python compiled in Debug mode a little bit faster on
4+
Windows.

PCbuild/pyproject.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
<SuppressStartupBanner>true</SuppressStartupBanner>
4343
<WholeProgramOptimization>true</WholeProgramOptimization>
4444
<EnableEnhancedInstructionSet Condition="'$(Platform)'=='Win32'">NoExtensions</EnableEnhancedInstructionSet>
45+
<InlineFunctionExpansion Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">OnlyExplicitInline</InlineFunctionExpansion>
46+
<InlineFunctionExpansion Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">OnlyExplicitInline</InlineFunctionExpansion>
4547
</ClCompile>
4648
<ClCompile Condition="$(Configuration) == 'Debug'">
4749
<Optimization>Disabled</Optimization>

0 commit comments

Comments
 (0)