Page MenuHomePhabricator

[libcxx] [cmake] Add a config option LIBCXX_HAS_WIN32_THREADS for enforcing win32 threads
ClosedPublic

Authored by mstorsjo on Jan 5 2018, 5:17 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

mstorsjo created this revision.Jan 5 2018, 5:17 AM
smeenai added a subscriber: smeenai.Jan 5 2018, 5:45 AM

I think LIBCXX_HAS_WIN32_THREAD_API would be more consistent with the existing configuration define names?

CMakeLists.txt
277 ↗(On Diff #128734)

The inconsistent usage of if( vs if ( in this file is annoying me haha. Not this diff's fault of course, but still.

I think LIBCXX_HAS_WIN32_THREAD_API would be more consistent with the existing configuration define names?

That sounds good to me too. I can update the patch later, or before committing if it's otherwise ok.

CMakeLists.txt
277 ↗(On Diff #128734)

Oh, yes... The new lines here were copypasted from the pthread ones a bit further above, explaining the inconsistency.

smeenai accepted this revision.Jan 5 2018, 11:53 AM

Can you add documentation for _LIBCPP_HAS_THREAD_API_WIN32 to docs/DesignDocs/ThreadingSupportAPI.rst? It should have been documented before, but this seems like a good opportunity to correct that.

LGTM with that and the rename.

This revision is now accepted and ready to land.Jan 5 2018, 11:53 AM
This revision was automatically updated to reflect the committed changes.