diff options
| author | Robert Haas | 2022-02-18 18:40:31 +0000 |
|---|---|---|
| committer | Robert Haas | 2022-02-18 18:40:31 +0000 |
| commit | 6c417bbcc8ff98875234ca269979fc7defde58e5 (patch) | |
| tree | c90ee35e9aa3efab4c0f08031aed9a96e9d08ac2 /src/tools | |
| parent | 2e372869aa38a9d6e4552c192da4454b17e01e38 (diff) | |
Add support for building with ZSTD.
This commit doesn't actually add anything that uses ZSTD; that will be
done separately. It just puts the basic infrastructure into place.
Jeevan Ladhe, Robert Haas, and Michael Paquier. Reviewed by Justin
Pryzby and Andres Freund.
Discussion: http://postgr.es/m/CA+TgmoatQKGd+8SjcV+bzvw4XaoEwminHjU83yG12+NXtQzTTQ@mail.gmail.com
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/msvc/Solution.pm | 13 | ||||
| -rw-r--r-- | src/tools/msvc/config_default.pl | 1 | ||||
| -rw-r--r-- | src/tools/msvc/vcregress.pl | 1 |
3 files changed, 15 insertions, 0 deletions
diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index 439809fcd00..a21ea9bef90 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -311,6 +311,7 @@ sub GenerateFiles HAVE_LIBXML2 => undef, HAVE_LIBXSLT => undef, HAVE_LIBZ => $self->{options}->{zlib} ? 1 : undef, + HAVE_LIBZSTD => undef, HAVE_LINK => undef, HAVE_LOCALE_T => 1, HAVE_LONG_INT_64 => undef, @@ -507,6 +508,7 @@ sub GenerateFiles USE_UNNAMED_POSIX_SEMAPHORES => undef, USE_WIN32_SEMAPHORES => 1, USE_WIN32_SHARED_MEMORY => 1, + USE_ZSTD => undef, WCSTOMBS_L_IN_XLOCALE => undef, WORDS_BIGENDIAN => undef, XLOG_BLCKSZ => 1024 * $self->{options}->{wal_blocksize}, @@ -540,6 +542,11 @@ sub GenerateFiles $define{HAVE_LZ4_H} = 1; $define{USE_LZ4} = 1; } + if ($self->{options}->{zstd}) + { + $define{HAVE_LIBZSTD} = 1; + $define{USE_ZSTD} = 1; + } if ($self->{options}->{openssl}) { $define{USE_OPENSSL} = 1; @@ -1082,6 +1089,11 @@ sub AddProject $proj->AddIncludeDir($self->{options}->{lz4} . '\include'); $proj->AddLibrary($self->{options}->{lz4} . '\lib\liblz4.lib'); } + if ($self->{options}->{zstd}) + { + $proj->AddIncludeDir($self->{options}->{zstd} . '\include'); + $proj->AddLibrary($self->{options}->{zstd} . '\lib\libzstd.lib'); + } if ($self->{options}->{uuid}) { $proj->AddIncludeDir($self->{options}->{uuid} . '\include'); @@ -1194,6 +1206,7 @@ sub GetFakeConfigure $cfg .= ' --with-libxml' if ($self->{options}->{xml}); $cfg .= ' --with-libxslt' if ($self->{options}->{xslt}); $cfg .= ' --with-lz4' if ($self->{options}->{lz4}); + $cfg .= ' --with-zstd' if ($self->{options}->{zstd}); $cfg .= ' --with-gssapi' if ($self->{options}->{gss}); $cfg .= ' --with-icu' if ($self->{options}->{icu}); $cfg .= ' --with-tcl' if ($self->{options}->{tcl}); diff --git a/src/tools/msvc/config_default.pl b/src/tools/msvc/config_default.pl index 7a9b00be720..186849a09ad 100644 --- a/src/tools/msvc/config_default.pl +++ b/src/tools/msvc/config_default.pl @@ -15,6 +15,7 @@ our $config = { gss => undef, # --with-gssapi=<path> icu => undef, # --with-icu=<path> lz4 => undef, # --with-lz4=<path> + zstd => undef, # --with-zstd=<path> nls => undef, # --enable-nls=<path> tap_tests => undef, # --enable-tap-tests tcl => undef, # --with-tcl=<path> diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index a9946262398..e2b0db0879b 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -36,6 +36,7 @@ do './src/tools/msvc/config.pl' if (-f 'src/tools/msvc/config.pl'); $ENV{GZIP_PROGRAM} ||= 'gzip'; $ENV{LZ4} ||= 'lz4'; $ENV{TAR} ||= 'tar'; +$ENV{ZSTD} ||= 'zstd'; # buildenv.pl is for specifying the build environment settings # it should contain lines like: |
