From: Steve Hay Date: Tue, 3 Feb 2009 17:39:06 +0000 (+0000) Subject: Follow-up to commit 4adc95e616bac7eea015e9e47e439b063c1132d5 suggested by X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=200cbd6aa595a0743f2aa115148750c075df3f97;p=p5sagit%2Fp5-mst-13.2.git Follow-up to commit 4adc95e616bac7eea015e9e47e439b063c1132d5 suggested by Jan Dubois: Subject: RE: [perl #61492] ExtUtils::MM_Win32 should not generate "mt" command when CRT is statically linked From: "Jan Dubois" Date: Fri, 19 Dec 2008 10:07:07 -0800 Message-ID: <013d01c96204$9b211e80$d1635b80$@com> --- diff --git a/lib/ExtUtils/CBuilder/Platform/Windows.pm b/lib/ExtUtils/CBuilder/Platform/Windows.pm index 13ced8b..c23347f 100644 --- a/lib/ExtUtils/CBuilder/Platform/Windows.pm +++ b/lib/ExtUtils/CBuilder/Platform/Windows.pm @@ -344,12 +344,10 @@ sub format_linker_cmd { $spec{output} , ) ]; - # Embed the manifest file for VC 2005 (aka VC 8) or higher, but not for the 64-bit Platform SDK compiler - if ($cf->{ivsize} == 4 && $cf->{cc} eq 'cl' and $cf->{ccversion} =~ /^(\d+)/ and $1 >= 14) { - push @cmds, [ - 'if', 'exist', $spec{manifest}, 'mt', '-nologo', $spec{manifest}, '-outputresource:' . "$output;2" - ]; - } + # Embed the manifest file if it exists + push @cmds, [ + 'if', 'exist', $spec{manifest}, 'mt', '-nologo', $spec{manifest}, '-outputresource:' . "$output;2" + ]; return @cmds; } diff --git a/lib/ExtUtils/MM_Win32.pm b/lib/ExtUtils/MM_Win32.pm index a5c7f98..4021b9d 100644 --- a/lib/ExtUtils/MM_Win32.pm +++ b/lib/ExtUtils/MM_Win32.pm @@ -338,13 +338,10 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)$(DFSEP). q{ $(LD) -out:$@ $(LDDLFLAGS) }.$ldfrom.q{ $(OTHERLDFLAGS) } .q{$(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) -def:$(EXPORT_LIST)}); - # VS2005 (aka VC 8) or higher, but not for 64-bit compiler from Platform SDK - if ($Config{ivsize} == 4 && $Config{cc} eq 'cl' and $Config{ccversion} =~ /^(\d+)/ and $1 >= 14) - { - push(@m, - q{ - if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 && if exist $@.manifest del $@.manifest}); - } + # Embed the manifest file if it exists + push(@m, q{ + if exist $@.manifest mt -nologo -manifest $@.manifest -outputresource:$@;2 + if exist $@.manifest del $@.manifest}); } push @m, ' $(CHMOD) $(PERM_RWX) $@