This is an archive of the discontinued LLVM Phabricator instance.

[libcxxabi] Refactor building and testing libc++abi without threads
ClosedPublic

Authored by EricWF on Nov 24 2014, 2:07 PM.

Details

Summary

This patch adds CMake support for building and testing libc++abi without threads.

  1. Add LIBCXXABI_ENABLE_THREADS option to CMake.
  2. Propagate LIBCXXABI_ENABLE_THREADS to lit via lit.site.cfg.in
  3. Configure tests for `LIBCXXABI_ENABLE_THREADS=OFF

Currently the test suite does not work when libc++abi is built without threads because that information does not propagate to the test suite.

Diff Detail

Event Timeline

EricWF updated this revision to Diff 16579.Nov 24 2014, 2:07 PM
EricWF retitled this revision from to [libcxxabi] Refactor building and testing libc++abi without threads.
EricWF updated this object.
EricWF edited the test plan for this revision. (Show Details)
EricWF added reviewers: danalbert, jroelofs, mclow.lists.
EricWF added a subscriber: Unknown Object (MLST).
EricWF updated this revision to Diff 16580.Nov 24 2014, 2:13 PM

Removed stray white space and extra include. Sorry for the noise.

EricWF added inline comments.Nov 24 2014, 2:15 PM
test/test_exception_storage.cpp
59–62

__cxa_get_globals() never returns null even when LIBCXXABI_HAS_NO_THREADS is defined. So I think the old expected result is wrong.

jroelofs accepted this revision.Nov 24 2014, 2:29 PM
jroelofs edited edge metadata.

Looks ok to me.

test/test_exception_storage.cpp
59–62

Yeah, that should have been '==' not '!='. Oops. I think I remember fixing this locally, but I guess I didn't upstream it.

And yeah, this test is pretty much pointless when doing single-threaded stuff.

This revision is now accepted and ready to land.Nov 24 2014, 2:29 PM
EricWF closed this revision.Nov 24 2014, 2:42 PM