From 4ad7c1c2371cee053e0fc22fdf7fd4a6fda1ecd5 Mon Sep 17 00:00:00 2001 From: Alexander Riccio Date: Wed, 1 Apr 2020 23:47:25 -0400 Subject: [PATCH 1/2] Tweak overlapped build options to reduce binary size Similarly to bpo-40145, this tweaks build options to reduce the size of the binary. _overlapped.pyd 32 bit unimproved release size: 31KB _overlapped.pyd 32 bit improved release size: 29KB size reduction: -3KB % size reduction: 10% _overlapped_d.pyd 32 bit unimproved release size: 55KB _overlapped_d.pyd 32 bit improved release size: 34KB size reduction: -21KB % size reduction: 38% _overlapped.pyd 64 bit unimproved release size: 39KB _overlapped.pyd 64 bit improved release size: 36KB size reduction: -3KB % size reduction: 8% _overlapped_d.pyd 64 bit unimproved release size: 74KB _overlapped_d.pyd 64 bit improved release size: 41KB size reduction: -33KB % size reduction: 45% --- PCbuild/_overlapped.vcxproj | 99 +++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/PCbuild/_overlapped.vcxproj b/PCbuild/_overlapped.vcxproj index 9e60d3b5db336c..2b9a0dabe88b56 100644 --- a/PCbuild/_overlapped.vcxproj +++ b/PCbuild/_overlapped.vcxproj @@ -94,7 +94,106 @@ ws2_32.lib;%(AdditionalDependencies) + DebugFull + DebugFull + DebugFull + true + true + UseLinkTimeCodeGeneration + true + true + UseLinkTimeCodeGeneration + true + true + UseLinkTimeCodeGeneration + DebugFull + DebugFull + DebugFull + DebugFull + DebugFull + DebugFull + DebugFull + DebugFull + DebugFull + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + AnySuitable + + + true + /Zo + Custom + + + AnySuitable + + + true + /Zo + Custom + + + AnySuitable + + + true + /Zo + Custom + + + AnySuitable + /Zo /Gw + + + AnySuitable + /Zo /Gw + + + AnySuitable + /Zo /Gw + + + AnySuitable + /Zo /Gw + + + AnySuitable + /Zo /Gw + + + AnySuitable + /Zo /Gw + + + AnySuitable + /Zo /Gw + + + AnySuitable + /Zo /Gw + + + AnySuitable + /Zo /Gw + From d633c3359aeb3029ba2ef032e678cc36cd6cc49f Mon Sep 17 00:00:00 2001 From: Alexander Riccio Date: Wed, 1 Apr 2020 23:53:53 -0400 Subject: [PATCH 2/2] add blurb --- .../Windows/2020-04-01-23-51-14.bpo-40151.fyT5PT.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Misc/NEWS.d/next/Windows/2020-04-01-23-51-14.bpo-40151.fyT5PT.rst diff --git a/Misc/NEWS.d/next/Windows/2020-04-01-23-51-14.bpo-40151.fyT5PT.rst b/Misc/NEWS.d/next/Windows/2020-04-01-23-51-14.bpo-40151.fyT5PT.rst new file mode 100644 index 00000000000000..8abd0361f82492 --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2020-04-01-23-51-14.bpo-40151.fyT5PT.rst @@ -0,0 +1,10 @@ +Similarly to bpo-40145, this tweaks build options to reduce the size of the +_overlapped binary. + +_overlapped.pyd 32 bit release size reduction: -3KB + +_overlapped_d.pyd 32 bit debug size reduction: -21KB + +_overlapped.pyd 64 bit release size reduction: -3KB + +_overlapped_d.pyd 64 bit debug size reduction: -33KB