[libcxx-commits] [PATCH] D58916: [libc++] Do not define __muloti4 on Apple platforms
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Mar 4 11:55:52 PST 2019
ldionne created this revision.
ldionne added a reviewer: EricWF.
Herald added subscribers: libcxx-commits, jdoerfert, dexonsmith, jkorous, christof.
The filesystem library defines __muloti4 as a hack on platforms that do
not provide compiler_rt, and that do not define __muloti4 as a result.
This is not the case on Apple platforms, and so we don't want libc++ to
define this symbol in that case.
Note that a less intrusive workaround for platforms that do not define
__muloti4 would be preferable.
Repository:
rCXX libc++
https://reviews.llvm.org/D58916
Files:
libcxx/src/filesystem/int128_builtins.cpp
Index: libcxx/src/filesystem/int128_builtins.cpp
===================================================================
--- libcxx/src/filesystem/int128_builtins.cpp
+++ libcxx/src/filesystem/int128_builtins.cpp
@@ -16,7 +16,12 @@
#include "__config"
#include "climits"
-#if !defined(_LIBCPP_HAS_NO_INT128)
+// Apple platforms provide compiler_rt, so there is no need to define __muloti4 here.
+#if !defined(__APPLE__)
+# define _LIBCPP_DEFINE_MULOTI4_IN_DYLIB
+#endif
+
+#if !defined(_LIBCPP_HAS_NO_INT128) && defined(_LIBCPP_DEFINE_MULOTI4_IN_DYLIB)
extern "C" __attribute__((no_sanitize("undefined")))
__int128_t __muloti4(__int128_t a, __int128_t b, int* overflow) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58916.189180.patch
Type: text/x-patch
Size: 677 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20190304/c91e381a/attachment.bin>
More information about the libcxx-commits
mailing list