This is an archive of the discontinued LLVM Phabricator instance.

[sanitizer] Set default rtlib to libgcc
ClosedPublic

Authored by rprichard on Feb 23 2021, 9:43 PM.

Details

Summary

The default --rtlib for Android is about to change from libgcc to
compiler-rt (D96404), which will require a more substantial change to
this script to build the builtins and libunwind. For now, keep using
libgcc.

Diff Detail

Event Timeline

rprichard created this revision.Feb 23 2021, 9:43 PM
rprichard requested review of this revision.Feb 23 2021, 9:43 PM
rprichard added subscribers: danalbert, srhines, thakis, glandium.

I also tested a version of this change where I instead added --rtlib=libgcc to the flags in configure_android. It was necessary to add --rtlib=libgcc both for compiling and linking, because at compile-time, Clang can use outline-atomics on AArch64. On other architectures, though, the --rtlib=libgcc has no effect at compile-time, and Clang printed a warning. It looks like this stage2 compiler is only used to target Android, though, so it seemed simpler to just override the default.

At some point, I think we'll want to update this script to build the builtins and libunwind before building the rest of compiler-rt.

vitalybuka accepted this revision.Feb 24 2021, 4:49 PM
This revision is now accepted and ready to land.Feb 24 2021, 4:49 PM
This revision was automatically updated to reflect the committed changes.