I don't really know much about MinGW, and i also am not in a position to be able to look at any code right now as I'm technically OOO for another 3 weeks. That said, if it is possible to make this work as a delayload dll, it would be much preferred, even if it strays from some existing implementation that does something different. With MSVC, this is as simple as adding a linker flag, and you don't have to change even 1 line of code. I'm not sure if MinGW toolchain supports this, but please check first. I'll leave the final lgtm to someone else on this review.<br><div class="gmail_quote"><div dir="ltr">On Fri, Jun 26, 2015 at 18:10 Leny Kholodov <<a href="mailto:leny.kholodov@gmail.com">leny.kholodov@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D10737-23195096&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=oSI_A5eSL_yra5mZJ8EUS_EZyPc8EBacSubBGpxW73s&s=Y4tcehenKTvyvpOWJugQz2-mlZMMvR_oek533OVbQTY&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/D10737#195096</a>, @zturner wrote:<br>
<br>
> Why not just make it delay load dll instead of all the LoadLibrary stuff?<br>
<br>
<br>
This was done for supporting mingw distributions without 64-bit versions of the DebugHlp APIs (please, see lib/Support/Windows/Signals.inc line 49 and below). Existing code base has already implemented dll loading part for some cases so I have prepared the patch as close to current implementation as possible.<br>
<br>
<br>
REPOSITORY<br>
rL LLVM<br>
<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D10737&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=oSI_A5eSL_yra5mZJ8EUS_EZyPc8EBacSubBGpxW73s&s=zjdREwvliY6dDvKWuzSs4nyATa9vTy4MiPKkJMWvuqY&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/D10737</a><br>
<br>
EMAIL PREFERENCES<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_settings_panel_emailpreferences_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=BSqEv9KvKMW_Ob8SyngJ70KdZISM_ASROnREeq0cCxk&m=oSI_A5eSL_yra5mZJ8EUS_EZyPc8EBacSubBGpxW73s&s=p4Gj8FxxG4jwJB7IYad-31bVHQvoDHIMWZzcvqMXTdE&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</blockquote></div>