]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-35059, PCbuild: Expand inline funcs in Debug (GH-10094)
authorVictor Stinner <vstinner@redhat.com>
Fri, 26 Oct 2018 13:10:29 +0000 (15:10 +0200)
committerGitHub <noreply@github.com>
Fri, 26 Oct 2018 13:10:29 +0000 (15:10 +0200)
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.

Misc/NEWS.d/next/Build/2018-10-26-14-49-19.bpo-35059.PKsBxP.rst [new file with mode: 0644]
PCbuild/pyproject.props

diff --git a/Misc/NEWS.d/next/Build/2018-10-26-14-49-19.bpo-35059.PKsBxP.rst b/Misc/NEWS.d/next/Build/2018-10-26-14-49-19.bpo-35059.PKsBxP.rst
new file mode 100644 (file)
index 0000000..2621616
--- /dev/null
@@ -0,0 +1,4 @@
+PCbuild: Set InlineFunctionExpansion to OnlyExplicitInline ("/Ob1" option)
+in pyproject.props in Debug mode to expand functions marked as inline. This
+change should make Python compiled in Debug mode a little bit faster on
+Windows.
index 6d36977456e092b52ba4756724cfb733196b6c4f..95b349c077e5bcaba0a042f482101c07faa77288 100644 (file)
@@ -42,6 +42,8 @@
       <SuppressStartupBanner>true</SuppressStartupBanner>
       <WholeProgramOptimization>true</WholeProgramOptimization>
       <EnableEnhancedInstructionSet Condition="'$(Platform)'=='Win32'">NoExtensions</EnableEnhancedInstructionSet>
+      <InlineFunctionExpansion Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">OnlyExplicitInline</InlineFunctionExpansion>
+      <InlineFunctionExpansion Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">OnlyExplicitInline</InlineFunctionExpansion>
     </ClCompile>
     <ClCompile Condition="$(Configuration) == 'Debug'">
       <Optimization>Disabled</Optimization>