[PATCH] D59676: Make Parallel.h build with libc++ on Windows.

Billy Robert O'Neal III via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 21 19:04:21 PDT 2019


BillyONeal added a comment.

Attempting to use ConcRT powered machinery (like the Concurrency:: primitives in this file) with a different STL like libc++ is likely to be non-functional, since that calls into concrt140.dll which assumes MSVC++'s STL. There's also an issue here that this code is using std::mutex with ConcRT powered machinery like Concurrency::parallel_for_each, which is not supported and is likely to result in deadlocks. ConcRT assumes that everything you give to it is non-blocking, so you can't use Concurrency::parallel_for_each with platform synchronization primitives. (This is the biggest reason we, MSVC++, are moving away from ConcRT as a technoligy and did not use it to power our parallel algorithms implementation)

There's an additional concern here that ppl.h (and yvals.h) will force linking with MSVC++'s STL DLL, msvcp140.dll, because support machinery for ppl.h live in there. yvals.h enforces this with pragma comment(lib, "msvcp140.dll") et al. yvals.h also emits corresponding pragma detect_mismatch directives which libc++ probably doesn't want to expose.

I'm not really sure what the path forward here is.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59676/new/

https://reviews.llvm.org/D59676





More information about the llvm-commits mailing list