summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorEvgeny Vereshchagin <evvers@ya.ru>2022-10-10 06:17:38 +0000
committerEvgeny Vereshchagin <evvers@ya.ru>2022-10-13 03:20:07 +0000
commit9803fb09fcb465bbcb0d5508441e8287f6966b20 (patch)
tree775c814a0c6acf73da1365ed6500b281bd344647 /tools
parent0c3702bfd8f210ed82d4c48d44470554a0b3d534 (diff)
downloaddbus-9803fb09fcb465bbcb0d5508441e8287f6966b20.tar.gz
ci: build dbus with clang as well
It should make it possible to catch issues like like https://gitlab.freedesktop.org/dbus/dbus/-/merge_requests/357 Signed-off-by: Evgeny Vereshchagin <evvers@ya.ru>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/ci-build.sh20
-rwxr-xr-xtools/ci-install.sh2
2 files changed, 21 insertions, 1 deletions
diff --git a/tools/ci-build.sh b/tools/ci-build.sh
index 0e72b2d9..6420cdcb 100755
--- a/tools/ci-build.sh
+++ b/tools/ci-build.sh
@@ -77,6 +77,10 @@ init_wine() {
# Build system under test: autotools or cmake
: "${ci_buildsys:=autotools}"
+# ci_compiler:
+# Compiler used to build dbus: gcc or clang
+: "${ci_compiler:=gcc}"
+
# ci_distro:
# OS distribution in which we are testing
# Typical values: auto (detect at runtime), ubuntu, debian; maybe fedora in future
@@ -522,6 +526,12 @@ case "$ci_buildsys" in
;;
(*)
set -- -Db_sanitize=address,undefined "$@"
+
+ # https://github.com/mesonbuild/meson/issues/764
+ if [ "$ci_compiler" = "clang" ]; then
+ set -- -Db_lundef=false "$@"
+ fi
+
set -- -Db_pie=true "$@"
set -- -Duser_session=true "$@"
;;
@@ -531,6 +541,14 @@ case "$ci_buildsys" in
;;
esac
+ case "$ci_compiler" in
+ (clang)
+ export CC=clang
+ ;;
+ (*)
+ ;;
+ esac
+
# Debian doesn't have similar convenience wrappers, but we can use
# a cross-file
if [ -z "$meson_setup" ] || ! command -v "$meson_setup" >/dev/null; then
@@ -548,7 +566,7 @@ case "$ci_buildsys" in
$meson_setup "$@" "$srcdir"
meson compile -v
- [ "$ci_test" = no ] || meson test
+ [ "$ci_test" = no ] || meson test --print-errorlogs
DESTDIR=DESTDIR meson install
( cd DESTDIR && find . -ls)
;;
diff --git a/tools/ci-install.sh b/tools/ci-install.sh
index c53ede9b..b259a58e 100755
--- a/tools/ci-install.sh
+++ b/tools/ci-install.sh
@@ -148,6 +148,7 @@ case "$ci_distro" in
autotools-dev
ca-certificates
ccache
+ clang
cmake
debhelper
dh-autoreconf
@@ -169,6 +170,7 @@ case "$ci_distro" in
libselinux1-dev
libsystemd-dev
libx11-dev
+ llvm
meson
ninja-build
sudo