From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Tue, 11 Jan 2022 01:04:05 -0700 Subject: [PATCH] Tell TBB that SerenityOS does not support weak symbols Something about the Clang toolchain configuration causes undefined weak references to scalable_malloc to remain in the mold executable even though there's no chance we'll be loading the tbbmalloc library at runtime. So, just lie to TBB that we don't support weak symbols. --- third-party/tbb/include/oneapi/tbb/detail/_config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third-party/tbb/include/oneapi/tbb/detail/_config.h b/third-party/tbb/include/oneapi/tbb/detail/_config.h index fa287cd2968ec7f336b754ee450a8da12f4ded23..b93878aa6369a8ffe386da4dd822ab5bd1fe3c3b 100644 --- a/third-party/tbb/include/oneapi/tbb/detail/_config.h +++ b/third-party/tbb/include/oneapi/tbb/detail/_config.h @@ -195,7 +195,7 @@ /** __TBB_WEAK_SYMBOLS_PRESENT denotes that the system supports the weak symbol mechanism **/ #ifndef __TBB_WEAK_SYMBOLS_PRESENT - #define __TBB_WEAK_SYMBOLS_PRESENT ( !_WIN32 && !__APPLE__ && !__sun && (__TBB_GCC_VERSION >= 40000 || __INTEL_COMPILER ) ) + #define __TBB_WEAK_SYMBOLS_PRESENT ( !_WIN32 && !__APPLE__ && !__sun && !__serenity__ && (__TBB_GCC_VERSION >= 40000 || __INTEL_COMPILER ) ) #endif /** Presence of compiler features **/