File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,9 @@ option(LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS
127127 to provide compile-time errors when using features unavailable on some version of
128128 the shared library they shipped should turn this on and see `include/__configuration/availability.h`
129129 for more details." OFF )
130+ option (LIBCXX_ENABLE_OVERRIDDEN_FUNCTION_DETECTION
131+ "Whether to support detecting if an overridable function (typically a weak symbol)
132+ has been overidden by a user or not." ON )
130133
131134if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
132135 set (LIBCXX_DEFAULT_TEST_CONFIG "llvm-libc++-shared-gcc.cfg.in" )
@@ -763,6 +766,7 @@ config_define_if_not(LIBCXX_ENABLE_UNICODE _LIBCPP_HAS_NO_UNICODE)
763766config_define_if_not(LIBCXX_ENABLE_WIDE_CHARACTERS _LIBCPP_HAS_NO_WIDE_CHARACTERS)
764767config_define_if_not(LIBCXX_ENABLE_TIME_ZONE_DATABASE _LIBCPP_HAS_NO_TIME_ZONE_DATABASE)
765768config_define_if_not(LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS)
769+ config_define_if_not(LIBCXX_ENABLE_OVERRIDDEN_FUNCTION_DETECTION _LIBCPP_HAS_NO_OVERRIDDEN_FUNCTION_DETECTION)
766770
767771if (LIBCXX_ENABLE_ASSERTIONS)
768772 message (DEPRECATION "LIBCXX_ENABLE_ASSERTIONS is deprecated and will be removed in LLVM 20. Please use LIBCXX_HARDENING_MODE instead." )
Original file line number Diff line number Diff line change 2222#cmakedefine _LIBCPP_HAS_THREAD_API_WIN32
2323#cmakedefine _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS
2424#cmakedefine _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
25+ #cmakedefine _LIBCPP_HAS_NO_OVERRIDDEN_FUNCTION_DETECTION
2526#cmakedefine _LIBCPP_NO_VCRUNTIME
2627#cmakedefine _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION @_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION@
2728#cmakedefine _LIBCPP_HAS_NO_FILESYSTEM
Original file line number Diff line number Diff line change 6363// want to be defining special sections inside user's executables which use our headers.
6464//
6565
66- #if defined(_LIBCPP_OBJECT_FORMAT_MACHO)
66+ #if defined(_LIBCPP_OBJECT_FORMAT_MACHO) && !defined(_LIBCPP_HAS_NO_OVERRIDDEN_FUNCTION_DETECTION)
6767
6868# define _LIBCPP_CAN_DETECT_OVERRIDDEN_FUNCTION 1
6969# define _LIBCPP_MAKE_OVERRIDABLE_FUNCTION_DETECTABLE \
@@ -97,7 +97,7 @@ _LIBCPP_HIDE_FROM_ABI bool __is_function_overridden(_Ret (*__fptr)(_Args...)) no
9797_LIBCPP_END_NAMESPACE_STD
9898
9999// The NVPTX linker cannot create '__start/__stop' sections.
100- #elif defined(_LIBCPP_OBJECT_FORMAT_ELF) && !defined(__NVPTX__)
100+ #elif defined(_LIBCPP_OBJECT_FORMAT_ELF) && !defined(__NVPTX__) && !defined(_LIBCPP_HAS_NO_OVERRIDDEN_FUNCTION_DETECTION)
101101
102102# define _LIBCPP_CAN_DETECT_OVERRIDDEN_FUNCTION 1
103103# define _LIBCPP_MAKE_OVERRIDABLE_FUNCTION_DETECTABLE __attribute__ ((__section__(" __lcxx_override" )))
You can’t perform that action at this time.
0 commit comments