[libc++] Allow setting _LIBCPP_OVERRIDABLE_FUNC_VIS
authorNikolas Klauser <nikolasklauser@berlin.de>
Thu, 14 Jul 2022 13:04:36 +0000 (15:04 +0200)
committerNikolas Klauser <nikolasklauser@berlin.de>
Thu, 14 Jul 2022 13:09:38 +0000 (15:09 +0200)
Chromium changes this flag to be able to use a custom new/delete from a
dylib.

libcxx/include/__config

index 22c2ed7..f0e36a6 100644 (file)
@@ -545,11 +545,15 @@ typedef __char32_t char32_t;
 #    define _LIBCPP_TYPE_VIS _LIBCPP_VISIBILITY("default")
 #    define _LIBCPP_TEMPLATE_DATA_VIS _LIBCPP_VISIBILITY("default")
 #    define _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_VISIBILITY("default")
-#    define _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_VISIBILITY("default")
 #    define _LIBCPP_EXCEPTION_ABI _LIBCPP_VISIBILITY("default")
 #    define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS _LIBCPP_VISIBILITY("default")
 #    define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
 
+// TODO: Make this a proper customization point or remove the option to override it.
+#    ifndef _LIBCPP_OVERRIDABLE_FUNC_VIS
+#      define _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_VISIBILITY("default")
+#    endif
+
 #    if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
 // The inline should be removed once PR32114 is resolved
 #      define _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS inline _LIBCPP_HIDDEN