<div dir="ltr">I think we can. MSVC's std::once_flag default constructor is constexpr now. It still generates dynamic initialization code if you use it as a static local, but MSVC defaults to using thread safe static initialization, so that isn't a problem unless you disable it, which we don't. We disable it in compiler-rt (/Zc:threadSafeInit-), but that doesn't use this code.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 8, 2017 at 1:18 PM, Zachary Turner <span dir="ltr"><<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Is this the right review? <a href="https://reviews.llvm.org/D5922" target="_blank">https://reviews.llvm.org/<wbr>D5922</a><div><br></div><div>Being that this was over 2 years ago, I suspect it was when we were supporting MSVC2012 and 2013. Now that we're requiring MSVC2015, is it time to reconsider? I don't see any links to an MS Connect issue, so I don't know what the original bug was to know if it has been fixed.<div><div class="h5"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, Feb 8, 2017 at 1:03 PM Reid Kleckner <<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="m_-6621154697296392227gmail_msg">It's a sad story. Read the comments and the review threads. It's hilarious.</div><div class="gmail_extra m_-6621154697296392227gmail_msg"><br class="m_-6621154697296392227gmail_msg"><div class="gmail_quote m_-6621154697296392227gmail_msg"></div></div><div class="gmail_extra m_-6621154697296392227gmail_msg"><div class="gmail_quote m_-6621154697296392227gmail_msg">On Wed, Feb 8, 2017 at 1:00 PM, Zachary Turner via lldb-dev <span dir="ltr" class="m_-6621154697296392227gmail_msg"><<a href="mailto:lldb-dev@lists.llvm.org" class="m_-6621154697296392227gmail_msg" target="_blank">lldb-dev@lists.llvm.org</a>></span> wrote:<br class="m_-6621154697296392227gmail_msg"></div></div><div class="gmail_extra m_-6621154697296392227gmail_msg"><div class="gmail_quote m_-6621154697296392227gmail_msg"><blockquote class="gmail_quote m_-6621154697296392227gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="m_-6621154697296392227gmail_msg">Why doesn't llvm::call_once() just use std::call_once on Windows?</div><div class="m_-6621154697296392227m_-5120040696815873400HOEnZb m_-6621154697296392227gmail_msg"><div class="m_-6621154697296392227m_-5120040696815873400h5 m_-6621154697296392227gmail_msg"><br class="m_-6621154697296392227gmail_msg"><div class="gmail_quote m_-6621154697296392227gmail_msg"><div dir="ltr" class="m_-6621154697296392227gmail_msg">On Wed, Feb 8, 2017 at 12:40 PM Hans Wennborg <<a href="mailto:hans@chromium.org" class="m_-6621154697296392227gmail_msg" target="_blank">hans@chromium.org</a>> wrote:<br class="m_-6621154697296392227gmail_msg"></div><blockquote class="gmail_quote m_-6621154697296392227gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The Win64 lldb build seems broken (at 294367).<br class="m_-6621154697296392227m_-5120040696815873400m_-6239238600679238001gmail_msg m_-6621154697296392227gmail_msg">
<br class="m_-6621154697296392227m_-5120040696815873400m_-6239238600679238001gmail_msg m_-6621154697296392227gmail_msg">
I ran into this when trying to build the weekly snapshot<br class="m_-6621154697296392227m_-5120040696815873400m_-6239238600679238001gmail_msg m_-6621154697296392227gmail_msg">
(<a href="http://www.llvm.org/builds/" rel="noreferrer" class="m_-6621154697296392227m_-5120040696815873400m_-6239238600679238001gmail_msg m_-6621154697296392227gmail_msg" target="_blank">http://www.llvm.org/builds/</a>) which includes LLDB these days.<br class="m_-6621154697296392227m_-5120040696815873400m_-6239238600679238001gmail_msg m_-6621154697296392227gmail_msg">
<br class="m_-6621154697296392227m_-5120040696815873400m_-6239238600679238001gmail_msg m_-6621154697296392227gmail_msg">
I suspect this might be related to Kamil's changes a few days ago. I<br class="m_-6621154697296392227m_-5120040696815873400m_-6239238600679238001gmail_msg m_-6621154697296392227gmail_msg">
see Pavel committed something to fix Darwin afterwards.<br class="m_-6621154697296392227m_-5120040696815873400m_-6239238600679238001gmail_msg m_-6621154697296392227gmail_msg">
<br class="m_-6621154697296392227m_-5120040696815873400m_-6239238600679238001gmail_msg m_-6621154697296392227gmail_msg">
Zach, do you know what's going on here? Do we have any buildbot<br class="m_-6621154697296392227m_-5120040696815873400m_-6239238600679238001gmail_msg m_-6621154697296392227gmail_msg">
coverage for this?<br class="m_-6621154697296392227m_-5120040696815873400m_-6239238600679238001gmail_msg m_-6621154697296392227gmail_msg">
<br class="m_-6621154697296392227m_-5120040696815873400m_-6239238600679238001gmail_msg m_-6621154697296392227gmail_msg">
Creating library lib\liblldb.lib and object lib\liblldb.exp<br class="m_-6621154697296392227m_-5120040696815873400m_-6239238600679238001gmail_msg m_-6621154697296392227gmail_msg">
lldbHost.lib(HostInfoWindows.<wbr>cpp.obj) : error LNK2019: unresolved external symbo<br class="m_-6621154697296392227m_-5120040696815873400m_-6239238600679238001gmail_msg m_-6621154697296392227gmail_msg">
l "void __cdecl llvm::sys::_mm_mfence(void)" (?_mm_mfence@sys@llvm@@YAXXZ) refer<br class="m_-6621154697296392227m_-5120040696815873400m_-6239238600679238001gmail_msg m_-6621154697296392227gmail_msg">
enced in function "void __cdecl llvm::call_once<class <lambda_e212a11f7f891e804e<br class="m_-6621154697296392227m_-5120040696815873400m_-6239238600679238001gmail_msg m_-6621154697296392227gmail_msg">
713e15728a6adc> >(struct llvm::once_flag &,class <lambda_<wbr>e212a11f7f891e804e713e1<br class="m_-6621154697296392227m_-5120040696815873400m_-6239238600679238001gmail_msg m_-6621154697296392227gmail_msg">
5728a6adc> &&)" (??$call_once@V<lambda_<wbr>e212a11f7f891e804e713e15728a6a<wbr>dc>@@$$V@ll<br class="m_-6621154697296392227m_-5120040696815873400m_-6239238600679238001gmail_msg m_-6621154697296392227gmail_msg">
vm@@YAXAEAUonce_flag@0@$$QEAV<<wbr>lambda_<wbr>e212a11f7f891e804e713e15728a6a<wbr>dc>@@@Z)<br class="m_-6621154697296392227m_-5120040696815873400m_-6239238600679238001gmail_msg m_-6621154697296392227gmail_msg">
bin\liblldb.dll : fatal error LNK1120: 1 unresolved externals<br class="m_-6621154697296392227m_-5120040696815873400m_-6239238600679238001gmail_msg m_-6621154697296392227gmail_msg">
LINK failed. with 1120<br class="m_-6621154697296392227m_-5120040696815873400m_-6239238600679238001gmail_msg m_-6621154697296392227gmail_msg">
</blockquote></div>
</div></div><br class="m_-6621154697296392227gmail_msg"></blockquote></div></div><div class="gmail_extra m_-6621154697296392227gmail_msg"><div class="gmail_quote m_-6621154697296392227gmail_msg"><blockquote class="gmail_quote m_-6621154697296392227gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">______________________________<wbr>_________________<br class="m_-6621154697296392227gmail_msg">
lldb-dev mailing list<br class="m_-6621154697296392227gmail_msg">
<a href="mailto:lldb-dev@lists.llvm.org" class="m_-6621154697296392227gmail_msg" target="_blank">lldb-dev@lists.llvm.org</a><br class="m_-6621154697296392227gmail_msg">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev" rel="noreferrer" class="m_-6621154697296392227gmail_msg" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/lldb-dev</a><br class="m_-6621154697296392227gmail_msg">
<br class="m_-6621154697296392227gmail_msg"></blockquote></div></div></blockquote></div></div></div></div></div>
</blockquote></div><br></div>