aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-10-08 00:30:23 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-10-08 18:35:12 +0300
commit8e3365a02ef45f3c31b0ed18b9c125b8e80636fa (patch)
tree386c0d93eff7c66a4a534efe44158bb51c199168
parentc5cba029e1c94757b02cc78bcd031cf22567ef80 (diff)
Release version 10.2.10+8v10.2.10+8
Adapt for building with Clang on Windows
-rw-r--r--build/root.build6
-rw-r--r--manifest2
-rw-r--r--mysql/buildfile38
-rw-r--r--tests/build/root.build10
4 files changed, 34 insertions, 22 deletions
diff --git a/build/root.build b/build/root.build
index 31a6f14..d323a4b 100644
--- a/build/root.build
+++ b/build/root.build
@@ -9,10 +9,10 @@ using c
h{*}: extension = h
c{*}: extension = c
-if ($c.class == 'msvc')
-{
+if ($c.target.system == 'win32-msvc')
c.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
+
+if ($c.class == 'msvc')
c.coptions += /wd4251 /wd4275 /wd4800
-}
using in
diff --git a/manifest b/manifest
index 31a932f..bd2433e 100644
--- a/manifest
+++ b/manifest
@@ -1,6 +1,6 @@
: 1
name: libmariadb
-version: 10.2.10+7
+version: 10.2.10+8
project: mariadb
summary: MariaDB C API client library
license: LGPLv2.1
diff --git a/mysql/buildfile b/mysql/buildfile
index 0a40bcd..88e418f 100644
--- a/mysql/buildfile
+++ b/mysql/buildfile
@@ -16,8 +16,17 @@ lib{mariadb}: zlib/{c}{* } \
tclass = $c.target.class
tsys = $c.target.system
+linux = ($tclass == 'linux')
+bsd = ($tclass == 'bsd')
+macos = ($tclass == 'macos')
windows = ($tclass == 'windows')
+msvc_runtime = ($tsys == 'win32-msvc')
+
+gcc = ($c.class == 'gcc')
+msvc = ($c.class == 'msvc')
+clang_msvc = ($c.id == 'clang' && $msvc_runtime)
+
lib{mariadb}: win-iconv/{h c }{* } \
plugins/{ c }{$pvio_win32 }: include = $windows
@@ -28,7 +37,7 @@ lib{mariadb}: win-iconv/{h c }{* } \
#
# @@ TODO: need to enable SSL by default on POSIX.
#
-with_ssl = ($tsys == 'win32-msvc')
+with_ssl = $msvc_runtime
lib{mariadb}: libmariadb/{ c}{ma_tls} \
libmariadb/secure/{h c}{* }: include = $with_ssl
@@ -146,7 +155,7 @@ mariadb_poptions = "-I$out_root" "-I$src_root" "-I$src_base" \
if! $windows
{
- if ($tclass == 'linux')
+ if $linux
mariadb_poptions += -D_GNU_SOURCE
}
else
@@ -181,13 +190,18 @@ zlib_poptions = "-I$src_base/zlib"
plugins/ c.poptions =+ $mariadb_poptions
libmariadb/ c.poptions =+ $mariadb_poptions $zlib_poptions
-if ($c.class == 'msvc')
+# Disable the 'POSIX name for this item is deprecated' warnings.
+#
+if $clang_msvc
+ c.coptions += -Wno-deprecated-declarations
+
+if $msvc
{
# Disable warnings that pop up with /W3.
#
c.coptions += /wd4996 /wd4267
}
-elif ($c.class == 'gcc')
+elif $gcc
{
# Disable warnings that pop up with -Wall -Wextra. Upstream doesn't seem to
# care about these and it is not easy to disable specific warnings in a way
@@ -206,13 +220,13 @@ if! $windows
# hard-coded into libmariadb/libmariadb/CMakeList.txt. We drop the file for
# now.
#
- if ($tclass == 'linux')
+ if $linux
{
# Make sure all symbols are resolvable.
#
libs{mariadb}: c.loptions += -Wl,--no-undefined
}
- elif ($tclass == 'macos')
+ elif $macos
libs{mariadb}: c.loptions += -compatibility_version "$abi_version.0.0" \
-current_version "$abi_version.0.0"
@@ -227,21 +241,21 @@ if! $windows
# Note that glibc 2.26 deprecates libnsl and doesn't install it by default, so
# its linkage just fails.
#
-# if ($tclass == 'linux')
+# if $linux
# c.libs += -lnsl
- if ($tclass != 'bsd')
+ if! $bsd
c.libs += -ldl
- if ($tclass == 'macos')
+ if $macos
c.libs += -liconv
}
else
# @@ secur32
#
- c.libs += $regex.apply(ws2_32 shlwapi advapi32 version, \
- '(.+)', \
- $tsys == 'mingw32' ? '-l\1' : '\1.lib')
+ c.libs += $regex.apply(ws2_32 shlwapi advapi32 version, \
+ '(.+)', \
+ $msvc_runtime ? '\1.lib' : '-l\1')
# Export options.
#
diff --git a/tests/build/root.build b/tests/build/root.build
index 5a412de..16cfb85 100644
--- a/tests/build/root.build
+++ b/tests/build/root.build
@@ -2,20 +2,18 @@
# copyright : Copyright (c) 2016-2019 Code Synthesis Ltd
# license : LGPLv2.1; see accompanying COPYING file
-# Make sure libmariadb headers comply with an oldest C standard.
-#
-c.std = 90
+c.std = 99
using c
h{*}: extension = h
c{*}: extension = c
-if ($c.class == 'msvc')
-{
+if ($c.target.system == 'win32-msvc')
c.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
+
+if ($c.class == 'msvc')
c.coptions += /wd4251 /wd4275 /wd4800
-}
# Every exe{} in this subproject is by default a test.
#