This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
XS DLLs shouldn't have comctl32.dll manifest in them, they dont link to it
authorDaniel Dragan <bulk88@hotmail.com>
Wed, 20 Jan 2016 15:38:21 +0000 (10:38 -0500)
committerTony Cook <tony@develop-help.com>
Mon, 25 Jan 2016 00:13:28 +0000 (11:13 +1100)
commit67c6176d33ade0a5f5b42c778ed3ed70afb49e81
tree4814fd72465f81d3ab271375d5dcf57432e5e0a7
parent6f9606402d094dd61cc66ca20e1768729a7dd4cb
XS DLLs shouldn't have comctl32.dll manifest in them, they dont link to it

The manifestdependency flag caused on VC 2005 and up for all XS DLLs to
include a manifest that references common controls v6 DLL, even though
nothing but perl5**.dll and perl-static.exe would ever link to
comctl32.dll. VC 2005 to VC 2008 put manifests in all DLLs since those
VC version's CRTs require manifests to load, all other VCs generate
.rsrc section free, and manifest free, DLLs by default. The
/manifestdependency flag passed to VC linker for all XS DLL, was causing
52 KB of bloat in disk size of the DLLs, and perhaps a little bit of CPU
to parse the manifest XML when the XS DLL is loaded.

Add a test to make sure the manifest for V6 isn't accidentally broken and
V5 gets loaded instead.

Note this commit leaves a little bit of unequal handling of the comctl
manifest between VC and GCC builds. VC >= 2005 builds with this patch will
add a manifest to perl523.dll and build helpers (not installed)
perlglob.exe and generate_uudmap.exe while GCC builds only manifest
perl.exe and wperl.exe.

With a VC 2013 32b build, before
C:\p523\src>dir /s *.dll
              55 File(s)      7,858,688 bytes

After
C:\p523\src>dir /s *.dll
              55 File(s)      7,805,440 bytes
ext/XS-APItest/APItest.xs
ext/XS-APItest/t/win32.t
win32/GNUmakefile
win32/Makefile
win32/makefile.mk