diff options
| author | Noah Misch | 2017-11-24 04:22:04 +0000 |
|---|---|---|
| committer | Noah Misch | 2017-11-24 04:24:53 +0000 |
| commit | 1695ce06860440103afb90f1ca10b0f4958da457 (patch) | |
| tree | df75ee8db0a14ae971cbc591dacb81172fcee69b /src/tools | |
| parent | c253b722f616d15c0b45c729465b4b85849cbcda (diff) | |
Support linking with MinGW-built Perl.
This is necessary for ActivePerl 5.18 onwards and for Strawberry Perl.
It is not sufficient for 32-bit builds with newer Visual Studio; these
fail with error LINK2026. Back-patch to 9.3 (all supported versions).
Reported by Victor Wagner.
Discussion: https://postgr.es/m/20160326154321.7754ab8f@wagner.wagner.home
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/msvc/Mkvcbuild.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm index 31a8294d300..52b1ec2d344 100644 --- a/src/tools/msvc/Mkvcbuild.pm +++ b/src/tools/msvc/Mkvcbuild.pm @@ -614,9 +614,10 @@ sub mkvcbuild } } $plperl->AddReference($postgres); + my $perl_path = $solution->{options}->{perl} . '\lib\CORE\*perl*'; + # ActivePerl 5.16 provided perl516.lib; 5.18 provided libperl518.a my @perl_libs = - grep { /perl\d+.lib$/ } - glob($solution->{options}->{perl} . '\lib\CORE\perl*.lib'); + grep { /perl\d+\.lib$|libperl\d+\.a$/ } glob($perl_path); if (@perl_libs == 1) { $plperl->AddLibrary($perl_libs[0]); |
