From 3b4846611de6b22e157180ee428a2ab4e4e7bcc5 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 1 Nov 2023 14:34:37 +0000 Subject: [PATCH] glib: Disable dynamic asan loading on macOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The weak symbol resolution doesn’t seem to work (see https://gitlab.gnome.org/GNOME/glib/-/jobs/3265405): ``` Undefined symbols for architecture x86_64: "___lsan_enable", referenced from: _g_leak_sanitizer_is_supported in gutils.c.o "___lsan_ignore_object", referenced from: _g_ignore_leak in gquark.c.o _g_ignore_leak in gthreadpool.c.o _g_ignore_leak in gutils.c.o _g_leak_sanitizer_is_supported in gutils.c.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) ``` See !3672 Signed-off-by: Philip Withnall --- glib/glib-private.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glib/glib-private.h b/glib/glib-private.h index 8053f1d8c..dcafddc24 100644 --- a/glib/glib-private.h +++ b/glib/glib-private.h @@ -53,7 +53,7 @@ * as we'd like: https://stackoverflow.com/a/11529277/210151 and * https://devblogs.microsoft.com/oldnewthing/20200731-00/?p=104024 */ -#elif defined (G_OS_UNIX) && g_macro__has_attribute (weak) +#elif defined (G_OS_UNIX) && !defined (__APPLE__) && g_macro__has_attribute (weak) #define HAS_DYNAMIC_ASAN_LOADING