mingw does not support the weak attribute

This commit is contained in:
rfm 2025-01-08 17:24:10 +00:00
parent 7e66968c2e
commit aa0aa08c01

View file

@ -58,6 +58,9 @@ static Class GSArrayClass;
*/
#if !GNUSTEP_WITH_ASAN
static Class GSInlineArrayClass;
#if defined(__WIN32)
static int (*lsanCheck)(void) = NULL; // No weak symbol support :-(
#else
/* For runtime detection of LSAN, we use a weak symbol for one of its
* library functions. Then, if lsanCheck is not zero we try to change
* behavior to avoid false positives.
@ -65,6 +68,7 @@ static Class GSInlineArrayClass;
int __lsan_do_recoverable_leak_check(void) __attribute__((weak));
static int (*lsanCheck)(void) = __lsan_do_recoverable_leak_check;
#endif
#endif
/* This class stores objects inline in data beyond the end of the instance.
*/