From 3f36fee3006d7b769beed9de2d3ef513bcf08c5e Mon Sep 17 00:00:00 2001 From: Zurab Kvachadze Date: Wed, 19 Nov 2025 03:31:30 +0100 Subject: [PATCH 1/2] ci: Set -Db_lundef=false when building with sanitisers under Clang Clang cannot handle building shared libraries with sanitizers and -Wl,--no-undefined (set by default unless explicitly disabled with -Db_lundef=false). This commit prefixes CI in case shared libraries are built with sanitisers. Signed-off-by: Zurab Kvachadze --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d1efee1b9..a93cbb1c6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -642,7 +642,7 @@ jobs: - name: clang+sanitize args: >- - "-Db_sanitize=address,undefined" + "-Db_sanitize=address,undefined -Db_lundef=false" extra_envs: CC: clang CXX: clang++ @@ -656,7 +656,7 @@ jobs: # Use Visual Studio supplied clang-cl instead. - name: clang-cl+sanitize args: >- - "-Db_sanitize=address,undefined" + "-Db_sanitize=address,undefined -Db_lundef=false" extra_envs: CC: clang-cl CXX: clang-cl From 7b63c891d7e5060bd7c69106a68f07178c9c1595 Mon Sep 17 00:00:00 2001 From: Zurab Kvachadze Date: Sat, 1 Nov 2025 17:41:37 +0100 Subject: [PATCH 2/2] meson.build: Do not hardcode default_library=static During the build, the default library can be overridden via the -Ddefault_library=type flag. Presetting this key in meson.build makes life harder for distributions which almost always want to build shared libraries. Those requiring static libraries can always force that via the aforementioned flag. Signed-off-by: Zurab Kvachadze --- meson.build | 1 - 1 file changed, 1 deletion(-) diff --git a/meson.build b/meson.build index 1c178513c..a37844fee 100644 --- a/meson.build +++ b/meson.build @@ -5,7 +5,6 @@ project( default_options: [ 'c_std=gnu11,c11', 'warning_level=3', - 'default_library=static', ], license: 'MIT', license_files: 'LICENSE',