This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Do not define __muloti4 on Apple platforms
AbandonedPublic

Authored by ldionne on Mar 4 2019, 11:55 AM.

Details

Reviewers
EricWF
Summary

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.

Event Timeline

ldionne created this revision.Mar 4 2019, 11:55 AM

This patch is a not-so-great minimal fix for Apple platforms. @EricWF , if you have a suggestion of how to do this better (for example we could compile __muloti4 into a separate static archive and ship that on platforms that are not compiler_rt-based), feel free to suggest.

ldionne abandoned this revision.Mar 4 2019, 12:14 PM

I just noticed this was already handled by defining LIBCXX_USE_COMPILER_RT=ON in the CMake. Although I think the default should be LIBCXX_USE_COMPILER_RT=ON.

Yeah, if we need to remove this symbol, I would just remove the source file from the build.