diff options
author | Magnus Hagander <magnus@hagander.net> | 2018-03-02 12:40:49 +0100 |
---|---|---|
committer | Magnus Hagander <magnus@hagander.net> | 2018-03-02 12:40:49 +0100 |
commit | 7240962f8626ff09bb8f9e71ecdb074775bdd035 (patch) | |
tree | 9d458e1cc118e2f00011f9ed55fb13c7b6d4a136 /src | |
parent | 17b340abf83d1b5f67808c45c63b9e0439569cef (diff) | |
download | postgresql-7240962f8626ff09bb8f9e71ecdb074775bdd035.tar.gz postgresql-7240962f8626ff09bb8f9e71ecdb074775bdd035.zip |
Fix msvc builds for ActivePerl > 5.24
From this version ActivePerl ships both a .lib and a .a file for the
perl library, which our code would detect as there being no library
available. Instead, we should pick the .lib version and use that.
Report and suggested fix in bug #15065
Author: Heath Lord
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/msvc/Mkvcbuild.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm index d8c279ab926..123292f48d8 100644 --- a/src/tools/msvc/Mkvcbuild.pm +++ b/src/tools/msvc/Mkvcbuild.pm @@ -524,9 +524,11 @@ sub mkvcbuild my $perl_path = $solution->{options}->{perl} . '\lib\CORE\*perl*'; # ActivePerl 5.16 provided perl516.lib; 5.18 provided libperl518.a + # Starting with ActivePerl 5.24, both perlnn.lib and libperlnn.a are provided. + # In this case, prefer .lib. my @perl_libs = grep { /perl\d+\.lib$|libperl\d+\.a$/ } glob($perl_path); - if (@perl_libs == 1) + if (@perl_libs > 0) { $plperl->AddLibrary($perl_libs[0]); } |