This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Handle in-tree libc++ for sanitizer tests
ClosedPublic

Authored by phosek on Jan 25 2022, 9:47 AM.

Details

Summary

We have been relying on the logic for C++ ABI library for sanitizer
tests but that's incorrect since most tests require a full C++ library
and not just C++ ABI. This change tries to address this by using the
dependency on libc++ if available.

Diff Detail

Event Timeline

phosek created this revision.Jan 25 2022, 9:47 AM
phosek requested review of this revision.Jan 25 2022, 9:47 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 25 2022, 9:47 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
abrachet accepted this revision.Jan 26 2022, 8:38 AM
This revision is now accepted and ready to land.Jan 26 2022, 8:38 AM
ldionne added inline comments.Jan 26 2022, 9:36 AM
compiler-rt/CMakeLists.txt
535

You just triggered a huge red flag for me by using HAVE_LIBCXX. I hate that thing, it's a ad-hoc cross-project hack for a tricky issue I don't even remember, but it feels like we should have a proper solution for it instead. Am I wrong? If that is correct, I would really like to avoid spreading its use even more.

phosek added inline comments.Jan 26 2022, 9:53 AM
compiler-rt/CMakeLists.txt
535

I know, I feel the same way, but I think we can remove condition altogether in the subsequent change D118200 since the generator expression serves the same purpose but it's a cleaner solution. I'd just prefer landing this as two separate changes to make sure this doesn't break anything.

This revision was landed with ongoing or failed builds.Jan 26 2022, 1:09 PM
This revision was automatically updated to reflect the committed changes.