[PATCH] Removing the static initializer in ManagedStatic.cpp by using llvm_call_once to initialize the ManagedStatic mutex.

Reid Kleckner rnk at google.com
Thu Oct 30 13:17:40 PDT 2014


> Can you instead use a windows specific api for implementing call once?

The obvious API was added in Vista, so we'd have to drop support for
running LLVM on Windows XP. Given that official Microsoft support ended in
April, it's probably reasonable for us to do this.

XP will probably fall off the cart soon for other reasons. For example, if
we want new C++11 library features (std::thread!), we will need to use
newer CRTs which probably do not run on XP.

Pre-Vista MSDN basically recommends that you roll your own double checked
locking to avoid races due to static local initialization. =P

http://reviews.llvm.org/D5922






More information about the llvm-commits mailing list