This is an archive of the discontinued LLVM Phabricator instance.

Use SANITIZER_GNU in compiler-rt when detecting features
AbandonedPublic

Authored by MaskRay on Dec 28 2020, 8:33 AM.

Details

Summary

Previously compiler-rt used SANITIZER_LINUX && !SANITIZER_ANDROID,
which caused non-glibc linux systems to fail the build because
SANITIZER_LINUX assumed GNU extensions were present (and the headers
were arranged as on GNU systems, instead as on POSIX systems)

Use SANITIZER_GNU with asan.

Allows linux/musl to compile asan. We need to define _DYNAMIC there as
well, since it is not standard

Diff Detail

Event Timeline

ronchaine created this revision.Dec 28 2020, 8:33 AM
ronchaine requested review of this revision.Dec 28 2020, 8:33 AM
Herald added a subscriber: Restricted Project. · View Herald TranscriptDec 28 2020, 8:33 AM

Standalone patch as per request in D63785 from new rebase to master (2020-12-28).

I added the reviewers straight from that issue, plus MaskRay as the request for this patch came from them.
I cannot test this patch on Android myself for the lack of build environment.

Hi @ronchaine, I posted D93848 after I posted that comment...

MaskRay commandeered this revision.Dec 31 2020, 11:43 AM
MaskRay edited reviewers, added: ronchaine; removed: MaskRay.

Superseded by D93848

MaskRay abandoned this revision.Dec 31 2020, 11:43 AM