Skip to content

Commit 9ca40dc

Browse files
committed
Add support for LZ4 build in MSVC scripts
Since its introduction in bbe0a81, compression of table data supports LZ4, but nothing had been done within the MSVC scripts to allow users to build the code with this library. This commit closes the gap by extending the MSVC scripts to be able to build optionally with LZ4. Getting libraries that can be used for compilation and execution is possible as LZ4 can be compiled down to MSVC 2010 using its source tarball. MinGW may require extra efforts to be able to work, and I have been able to test this only with MSVC, still this is better than nothing to give users a way to test the feature on Windows. Author: Dilip Kumar Reviewed-by: Michael Paquier Discussion: https://postgr.es/m/YJPdNeF68XpwDDki@paquier.xyz
1 parent 049e1e2 commit 9ca40dc

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

doc/src/sgml/install-windows.sgml

+10
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,16 @@ $ENV{MSBFLAGS}="/m";
304304
</para></listitem>
305305
</varlistentry>
306306

307+
<varlistentry>
308+
<term><productname>LZ4</productname></term>
309+
<listitem><para>
310+
Required for supporting <productname>LZ4</productname> compression
311+
method for compressing the table data. Binaries and source can be
312+
downloaded from
313+
<ulink url="https://github.com/lz4/lz4/releases"></ulink>.
314+
</para></listitem>
315+
</varlistentry>
316+
307317
<varlistentry>
308318
<term><productname>OpenSSL</productname></term>
309319
<listitem><para>

src/tools/msvc/Solution.pm

+12
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,12 @@ sub GenerateFiles
535535
$define{HAVE_LIBXSLT} = 1;
536536
$define{USE_LIBXSLT} = 1;
537537
}
538+
if ($self->{options}->{lz4})
539+
{
540+
$define{HAVE_LIBLZ4} = 1;
541+
$define{HAVE_LZ4_H} = 1;
542+
$define{USE_LZ4} = 1;
543+
}
538544
if ($self->{options}->{openssl})
539545
{
540546
$define{USE_OPENSSL} = 1;
@@ -1054,6 +1060,11 @@ sub AddProject
10541060
$proj->AddIncludeDir($self->{options}->{xslt} . '\include');
10551061
$proj->AddLibrary($self->{options}->{xslt} . '\lib\libxslt.lib');
10561062
}
1063+
if ($self->{options}->{lz4})
1064+
{
1065+
$proj->AddIncludeDir($self->{options}->{lz4} . '\include');
1066+
$proj->AddLibrary($self->{options}->{lz4} . '\lib\liblz4.lib');
1067+
}
10571068
if ($self->{options}->{uuid})
10581069
{
10591070
$proj->AddIncludeDir($self->{options}->{uuid} . '\include');
@@ -1165,6 +1176,7 @@ sub GetFakeConfigure
11651176
$cfg .= ' --with-uuid' if ($self->{options}->{uuid});
11661177
$cfg .= ' --with-libxml' if ($self->{options}->{xml});
11671178
$cfg .= ' --with-libxslt' if ($self->{options}->{xslt});
1179+
$cfg .= ' --with-lz4' if ($self->{options}->{lz4});
11681180
$cfg .= ' --with-gssapi' if ($self->{options}->{gss});
11691181
$cfg .= ' --with-icu' if ($self->{options}->{icu});
11701182
$cfg .= ' --with-tcl' if ($self->{options}->{tcl});

src/tools/msvc/config_default.pl

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
extraver => undef, # --with-extra-version=<string>
1515
gss => undef, # --with-gssapi=<path>
1616
icu => undef, # --with-icu=<path>
17+
lz4 => undef, # --with-lz4=<path>
1718
nls => undef, # --enable-nls=<path>
1819
tap_tests => undef, # --enable-tap-tests
1920
tcl => undef, # --with-tcl=<path>

0 commit comments

Comments
 (0)