summaryrefslogtreecommitdiff
path: root/libpq/buildfile
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-10-07 20:41:00 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-10-08 18:41:31 +0300
commitfc9499b8a7b7a3e350bfabf2cd6ae0bc13f04bea (patch)
tree0e79203726137afadc4da2ee0f02dd0b8ebad11e /libpq/buildfile
parenteb6a46a0e08374940641fe753b53e0570d67c787 (diff)
Release version 9.6.5+6v9.6.5+6
Adapt for building with Clang on Windows
Diffstat (limited to 'libpq/buildfile')
-rw-r--r--libpq/buildfile16
1 files changed, 10 insertions, 6 deletions
diff --git a/libpq/buildfile b/libpq/buildfile
index c261ba2..5a1732b 100644
--- a/libpq/buildfile
+++ b/libpq/buildfile
@@ -21,6 +21,8 @@ bsd = ($tclass == 'bsd')
macos = ($tclass == 'macos')
windows = ($tclass == 'windows')
+msvc_runtime = ($c.target.system == 'win32-msvc')
+
gcc = ($c.class == 'gcc')
msvc = ($c.class == 'msvc')
@@ -72,14 +74,16 @@ c.poptions =+ "-I$out_root" "-I$src_root" "-I$src_base" \
if $windows
c.poptions =+ "-I$src_base/win32"
-if $msvc
+if $msvc_runtime
{
c.poptions =+ "-I$src_base/postgresql/port/win32_msvc"
+ c.poptions += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
+
# Disable warnings that pop up with /W3.
#
- c.poptions += -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
- c.coptions += /wd4018 /wd4244 /wd4267
+ if $msvc
+ c.coptions += /wd4018 /wd4244 /wd4267
}
elif $gcc
{
@@ -162,9 +166,9 @@ else
#
# @@ Currently we don't have support for the first two steps.
#
- c.libs += $regex.apply(secur32 ws2_32 advapi32, \
- '(.+)', \
- $c.target.system == "mingw32" ? '-l\1' : '\1.lib')
+ c.libs += $regex.apply(secur32 ws2_32 advapi32, \
+ '(.+)', \
+ $msvc_runtime ? '\1.lib' : '-l\1')
# Export options.
#