[libcxx-commits] [PATCH] D140675: [AIX][libc++] Always opt in to _LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION
Michael Francis via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Feb 2 10:21:10 PST 2023
francii updated this revision to Diff 494356.
francii added a comment.
Update comment in __config
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140675/new/
https://reviews.llvm.org/D140675
Files:
libcxx/include/__config
libcxx/test/libcxx/vendor/ibm/bad_function_call.pass.cpp
Index: libcxx/test/libcxx/vendor/ibm/bad_function_call.pass.cpp
===================================================================
--- /dev/null
+++ libcxx/test/libcxx/vendor/ibm/bad_function_call.pass.cpp
@@ -0,0 +1,19 @@
+//===-- libc++ export redefined symbols test ------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: target={{powerpc.*-ibm-aix.*}}
+// ADDITIONAL_COMPILE_FLAGS: -fvisibility-inlines-hidden
+
+#include <functional>
+
+void foo() {}
+
+int main() {
+ std::function<void()> r(foo);
+ r();
+}
Index: libcxx/include/__config
===================================================================
--- libcxx/include/__config
+++ libcxx/include/__config
@@ -155,6 +155,12 @@
# if defined(__FreeBSD__)
# define _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR
# endif
+// For XCOFF linkers, we have problems if we see a weak hidden version of a symbol
+// in user code (like you get with -fvisibility-inlines-hidden) and then a strong def
+// in the library, so we need to always rely on the library version.
+# if defined(_AIX)
+# define _LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION
+# endif
# endif
# if defined(_LIBCPP_BUILDING_LIBRARY) || _LIBCPP_ABI_VERSION >= 2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140675.494356.patch
Type: text/x-patch
Size: 1503 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230202/7bab9a8a/attachment-0001.bin>
More information about the libcxx-commits
mailing list