From 0f050528fd087bc579320c3c01f9273860eaa1bf Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Thu, 14 Jul 2022 15:04:36 +0200 Subject: [PATCH] [libc++] Allow setting _LIBCPP_OVERRIDABLE_FUNC_VIS Chromium changes this flag to be able to use a custom new/delete from a dylib. --- libcxx/include/__config | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libcxx/include/__config b/libcxx/include/__config index 22c2ed7..f0e36a6 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 -- 2.7.4