This is an archive of the discontinued LLVM Phabricator instance.

Fix compile for -DLIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY
ClosedPublic

Authored by Nicu on May 21 2020, 3:45 AM.

Details

Reviewers
ldionne
Group Reviewers
Restricted Project
Commits
rG3411a1a92015: Fix compile for -DLIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY
Summary

Compilation with -DLIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY was failing due to missing declarations of functions used in libcxx/include/atomic. The lines this commit affects are the places where those functions are defined, now moved to be always defined.

Diff Detail

Event Timeline

Nicu created this revision.May 21 2020, 3:45 AM
Herald added 1 blocking reviewer(s): Restricted Project. · View Herald TranscriptMay 21 2020, 3:45 AM
ldionne accepted this revision.May 21 2020, 4:34 AM
ldionne added a subscriber: ldionne.

Out of curiosity, can you explain how you're using LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY? It is documented as being a feature only for libc++ developers.

The change LGTM though.

This revision is now accepted and ready to land.May 21 2020, 4:34 AM
miyuki added a subscriber: miyuki.May 21 2020, 5:42 AM

David is working with me on improving the testing of external threading configurations.

This revision was automatically updated to reflect the committed changes.

David is working with me on improving the testing of external threading configurations.

I'm curious to understand what your setup is.

Also, please run arcfilter next time you commit a patch to libcxx! Thanks!

I'm curious to understand what your setup is.

Internally we use _LIBCPP_HAS_THREAD_API_EXTERNAL in our downstream libc++ fork intended for the bare-metal environment. We aim to provide testing of this configuration and also the _LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL one. The plan is to set up public build bots for testing them. Unfortunately, this work is not high-priority, so I cannot make any commitments w.r.t. to it.