Skip to content

Commit 516d75c

Browse files
committed
Fix weak symbol definition on Darwin
1 parent 199b73d commit 516d75c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libcxx/src/include/overridable_function.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ _LIBCPP_END_NAMESPACE_STD
6767

6868
# define _LIBCPP_CAN_DETECT_OVERRIDDEN_FUNCTION 1
6969
# define _LIBCPP_OVERRIDABLE_FUNCTION(symbol, type, name, arglist) \
70-
static type symbol##_impl__ arglist __asm__("_" _LIBCPP_TOSTRING(symbol##_impl__)); \
70+
static type symbol##_impl__ arglist __asm__("_" _LIBCPP_TOSTRING(symbol)); \
7171
__asm__(".globl _" _LIBCPP_TOSTRING(symbol)); \
72-
__asm__(".set _" _LIBCPP_TOSTRING(symbol) ", _" _LIBCPP_TOSTRING(symbol##_impl__)); \
72+
__asm__(".weak_definition _" _LIBCPP_TOSTRING(symbol)); \
7373
extern __typeof(symbol##_impl__) name __attribute__((weak_import)); \
7474
_LIBCPP_BEGIN_NAMESPACE_STD \
7575
template <> \

0 commit comments

Comments
 (0)