[libcxx-commits] [libcxx] 0f05052 - [libc++] Allow setting _LIBCPP_OVERRIDABLE_FUNC_VIS

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jul 14 06:09:49 PDT 2022


Author: Nikolas Klauser
Date: 2022-07-14T15:09:38+02:00
New Revision: 0f050528fd087bc579320c3c01f9273860eaa1bf

URL: https://github.com/llvm/llvm-project/commit/0f050528fd087bc579320c3c01f9273860eaa1bf
DIFF: https://github.com/llvm/llvm-project/commit/0f050528fd087bc579320c3c01f9273860eaa1bf.diff

LOG: [libc++] Allow setting _LIBCPP_OVERRIDABLE_FUNC_VIS

Chromium changes this flag to be able to use a custom new/delete from a
dylib.

Added: 
    

Modified: 
    libcxx/include/__config

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__config b/libcxx/include/__config
index 22c2ed7fd87bc..f0e36a65cf138 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -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


        


More information about the libcxx-commits mailing list