summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Misch2017-12-09 08:58:55 +0000
committerNoah Misch2017-12-09 08:58:55 +0000
commit7e0c574ee26ce0308b76166312788e909b555c23 (patch)
treec4f85c9154a994fe1e18bccc20c7fb808649e5e9
parent65a00f30352a3c0ab5615fac008735b103cfa5bb (diff)
MSVC 2012+: Permit linking to 32-bit, MinGW-built libraries.
Notably, this permits linking to the 32-bit Perl binaries advertised on perl.org, namely Strawberry Perl and ActivePerl. This has a side effect of permitting linking to binaries built with obsolete MSVC versions. By default, MSVC 2012 and later require a "safe exception handler table" in each binary. MinGW-built, 32-bit DLLs lack the relevant exception handler metadata, so linking to them failed with error LNK2026. Restore the semantics of MSVC 2010, which omits the table from a given binary if some linker input lacks metadata. This has no effect on 64-bit builds or on MSVC 2010 and earlier. Back-patch to 9.3 (all supported versions). Reported by Victor Wagner. Discussion: https://postgr.es/m/[email protected]
-rw-r--r--src/tools/msvc/MSBuildProject.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm
index 7a287bd0bd..9ddccc7c55 100644
--- a/src/tools/msvc/MSBuildProject.pm
+++ b/src/tools/msvc/MSBuildProject.pm
@@ -320,6 +320,8 @@ sub WriteItemDefinitionGroup
<GenerateMapFile>false</GenerateMapFile>
<MapFileName>.\\$cfgname\\$self->{name}\\$self->{name}.map</MapFileName>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
+ <!-- Permit links to MinGW-built, 32-bit DLLs (default before VS2012). -->
+ <ImageHasSafeExceptionHandlers/>
<SubSystem>Console</SubSystem>
<TargetMachine>$targetmachine</TargetMachine>
EOF