diff --git a/libcxx/include/__config b/libcxx/include/__config --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -96,7 +96,9 @@ // Define a key function for `bad_function_call` in the library, to centralize // its vtable and typeinfo to libc++ rather than having all other libraries // using that class define their own copies. +# if defined(_AIX) & defined(_LIBCPP_BUILDING_LIBRARY) # define _LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION +# endif // Override the default return value of exception::what() for // bad_function_call::what() with a string that is specific to // bad_function_call (see http://wg21.link/LWG2233). This is an ABI break @@ -166,8 +168,11 @@ // Define a key function for `bad_function_call` in the library, to centralize // its vtable and typeinfo to libc++ rather than having all other libraries // using that class define their own copies. +# if defined(_AIX) & defined(_LIBCPP_BUILDING_LIBRARY) # define _LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION # endif +# endif + # define _LIBCPP_TOSTRING2(x) #x # define _LIBCPP_TOSTRING(x) _LIBCPP_TOSTRING2(x)