Page MenuHomePhabricator

[lldb] Let dotest check for the `cassert` header instead of `algorithm` for libc++ check

Authored by teemperor on Apr 22 2021, 5:34 AM.



This is just a dotest check to see if we can compile a simple program that uses libc++. Right now we are
parsing the rather big algorithm header in the test program, but the test really just checks
whether we can find *any* libc++ headers and link against some libc++ SO. Using the much smaller
cassert header for checking whether we can find libc++ headers speeds up this check by a bit.

After some incredibly unscientific performance testing this saves a few seconds when running the
test suite on Linux (on macOS we hardcoded that libc++ is always there, so this check won't be
used there and we don't save any time).

Diff Detail

Event Timeline

teemperor created this revision.Apr 22 2021, 5:34 AM
teemperor requested review of this revision.Apr 22 2021, 5:34 AM
jankratochvil accepted this revision.Apr 22 2021, 5:43 AM

The detection still works fine with libcxx-devel-11.0.0-1.fc33.x86_64.

This revision is now accepted and ready to land.Apr 22 2021, 5:43 AM