diff options
author | Daniel Dragan <bulk88@hotmail.com> | 2016-01-20 10:38:21 -0500 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2016-01-25 11:13:28 +1100 |
commit | 67c6176d33ade0a5f5b42c778ed3ed70afb49e81 (patch) | |
tree | 4814fd72465f81d3ab271375d5dcf57432e5e0a7 /win32 | |
parent | 6f9606402d094dd61cc66ca20e1768729a7dd4cb (diff) | |
download | perl-67c6176d33ade0a5f5b42c778ed3ed70afb49e81.tar.gz |
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
Diffstat (limited to 'win32')
-rw-r--r-- | win32/GNUmakefile | 2 | ||||
-rw-r--r-- | win32/Makefile | 5 | ||||
-rw-r--r-- | win32/makefile.mk | 5 |
3 files changed, 5 insertions, 7 deletions
diff --git a/win32/GNUmakefile b/win32/GNUmakefile index ecd25de656..6dd26e774f 100644 --- a/win32/GNUmakefile +++ b/win32/GNUmakefile @@ -696,7 +696,7 @@ endif CFLAGS_O = $(CFLAGS) $(BUILDOPT) ifeq ($(PREMSVC80),undef) -LINK_FLAGS += "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'" +PRIV_LINK_FLAGS += "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'" else RSC_FLAGS = -DINCLUDE_MANIFEST endif diff --git a/win32/Makefile b/win32/Makefile index 5916ccf9d5..0667384d7c 100644 --- a/win32/Makefile +++ b/win32/Makefile @@ -571,7 +571,7 @@ EXEOUT_FLAG = -Fe CFLAGS_O = $(CFLAGS) $(BUILDOPT) !IF "$(PREMSVC80)" == "undef" -LINK_FLAGS = $(LINK_FLAGS) "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'" +PRIV_LINK_FLAGS = $(PRIV_LINK_FLAGS) "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'" !ELSE RSC_FLAGS = -DINCLUDE_MANIFEST !ENDIF @@ -587,10 +587,9 @@ LINK_FLAGS = $(LINK_FLAGS) -subsystem:console,"5.02" ! ELSE LINK_FLAGS = $(LINK_FLAGS) -subsystem:console,"5.01" ! ENDIF -PRIV_LINK_FLAGS = !ELSE -PRIV_LINK_FLAGS = -subsystem:console +PRIV_LINK_FLAGS = $(PRIV_LINK_FLAGS) -subsystem:console !ENDIF BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS) diff --git a/win32/makefile.mk b/win32/makefile.mk index e1ad2adf9c..edc7311f06 100644 --- a/win32/makefile.mk +++ b/win32/makefile.mk @@ -688,7 +688,7 @@ TESTPREPGCC = CFLAGS_O = $(CFLAGS) $(BUILDOPT) .IF "$(PREMSVC80)" == "undef" -LINK_FLAGS += "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'" +PRIV_LINK_FLAGS += "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'" .ELSE RSC_FLAGS = -DINCLUDE_MANIFEST .ENDIF @@ -705,10 +705,9 @@ LINK_FLAGS += -subsystem:console,"5.02" .ELSE LINK_FLAGS += -subsystem:console,"5.01" .ENDIF -PRIV_LINK_FLAGS = .ELIF "$(CCTYPE)" != "GCC" -PRIV_LINK_FLAGS = -subsystem:console +PRIV_LINK_FLAGS += -subsystem:console .ENDIF BLINK_FLAGS = $(PRIV_LINK_FLAGS) $(LINK_FLAGS) |