Skip to content

Commit 9497ab0

Browse files
committed
[libcxx] Disable invalid __start/__stop reference on NVPTX
Summary: The logic for this `__is_function_overridden` check requires accessing a runtime array normally created by the linker. The NVPTX target is an `__ELF__` target, however it does not support emitting the `__start/__stop` symbols for C-identifier named sections. This needs to be disabled explicitly so that the user can compile this with anything.
1 parent 0cdaa2a commit 9497ab0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/src/include/overridable_function.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ _LIBCPP_HIDE_FROM_ABI bool __is_function_overridden(_Ret (*__fptr)(_Args...)) no
9696
}
9797
_LIBCPP_END_NAMESPACE_STD
9898

99-
#elif defined(_LIBCPP_OBJECT_FORMAT_ELF)
99+
#elif defined(_LIBCPP_OBJECT_FORMAT_ELF) && !defined(__NVPTX__)
100100

101101
# define _LIBCPP_CAN_DETECT_OVERRIDDEN_FUNCTION 1
102102
# define _LIBCPP_MAKE_OVERRIDABLE_FUNCTION_DETECTABLE __attribute__((__section__("__lcxx_override")))

0 commit comments

Comments
 (0)