summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaan <daan@effp.org>2022-11-02 10:25:46 -0700
committerdaan <daan@effp.org>2022-11-02 10:25:46 -0700
commit6e0f10dfd8e5ffe01f3f85dc30b562b4c703098a (patch)
tree4ae46dd4cb29011db002f74232e3dc86038262c5
parent5ad06f99978ce68c11fdbf8a527b6a124f44dc8b (diff)
potential fix for link error with clang-cl (issue #631)
-rw-r--r--src/alloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 1094570..af255f6 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -853,8 +853,8 @@ static bool mi_try_new_handler(bool nothrow) {
#else
typedef void (*std_new_handler_t)(void);
-#if (defined(__GNUC__) || defined(__clang__))
-std_new_handler_t __attribute((weak)) _ZSt15get_new_handlerv(void) {
+#if (defined(__GNUC__) || (defined(__clang__) && !defined(_MSC_VER))) // exclude clang-cl, see issue #631
+std_new_handler_t __attribute__((weak)) _ZSt15get_new_handlerv(void) {
return NULL;
}
static std_new_handler_t mi_get_new_handler(void) {