<div dir="ltr"><div>Thanks for that, Stefan. I built the main branch of LLVM (I have been using the 11.1 release branch) and tried again with --jit-kind=orc. That does indeed fix the crash. But lli fails with unresolved symbols:</div><div><br></div><div> Symbols not found: [ __emutls_v._Init_thread_epoch, __emutls_get_address, _Init_thread_header, _Init_thread_footer, ??3@YAXPEAX_K@Z, ??_7type_info@@6B@, ?_Facet_Register@std@@YAXPEAV_Facet_base@1@@Z ]</div><div><br></div><div>Geoff<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Apr 3, 2021 at 1:53 PM Stefan Gränitz <<a href="mailto:stefan.graenitz@gmail.com">stefan.graenitz@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
Hi Geoff<br>
<br>
<blockquote type="cite">LLVM ERROR: Associative COMDAT symbol
'GVName' is not a key for its COMDAT.</blockquote>
This is in CodeGen TargetLoweringObjectFileCOFF so this isn't
necessarily JIT specific. Maybe a backtrace would be helpful?<br>
<br>
<blockquote type="cite">lli --jit-end=orc-lazy hello.bc</blockquote>
Greedy Orc mode recently landed in lli:
<a href="https://reviews.llvm.org/rGe1579894d2051db8" target="_blank">https://reviews.llvm.org/rGe1579894d2051db8</a><br>
You might want to retry with that in order to rule out the
lazy-JIT-infrastructure as a cause for the error.<br>
<br>
<blockquote type="cite">should I just give up now on porting our
Orc-based application to Windows?</blockquote>
I am not aware of anyone actively working on improved Orc Windows
support right now.<br>
<br>
<div>On 02/04/2021 12:40, Geoff Levner via
llvm-dev wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Sorry, there is a typo in my previous message: read
"jit-kind" where I typed "jit-end".<br>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, Apr 2, 2021 at 12:37
PM Geoff Levner <<a href="mailto:glevner@gmail.com" target="_blank">glevner@gmail.com</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div>Given this C++ code (hello.cpp):</div>
<div><br>
</div>
<div><span style="font-family:monospace"> #include
<iostream><br>
int main()<br>
{<br>
std::cout << "Hi, mom." <<
std::endl;<br>
return 0;<br>
}</span></div>
<div><br>
</div>
<div>On Linux (CentOS 7), no problem:</div>
<div><br>
</div>
<div><span style="font-family:monospace"> > clang++ -c
-emit-llvm hello.cpp</span></div>
<div><span style="font-family:monospace"> > lli
--jit-end=orc-lazy hello.bc</span></div>
<div><span style="font-family:monospace"> Hi, mom.</span></div>
<div><span style="font-family:monospace"> ></span></div>
<div><br>
</div>
<div>But on Windows (7):</div>
<div>
<div><br>
</div>
<div><span style="font-family:monospace"> > clang++
-c -emit-llvm hello.cpp</span></div>
<div><span style="font-family:monospace"> > lli
--jit-end=orc-lazy hello.bc</span></div>
</div>
<div><span style="font-family:monospace"> LLVM ERROR:
Associative COMDAT symbol
'??_7_Iostream_error_category2@std@@6B@' is not a key
for its COMDAT.<br>
PLEASE submit a bug report to <a href="https://bugs.llvm.org/" target="_blank">https://bugs.llvm.org/</a> and
include the crash backtrace.</span></div>
<div><br>
</div>
<div>I know Orc JIT lacks COMDAT support, but I thought that
just caused duplicate symbols sometimes. Am I doing
something stupid here? Or should I just give up now on
porting our Orc-based application to Windows? (The
application JIT-compiles C++ modules which rely heavily on
STL.)<br>
</div>
<div><br>
</div>
<div>Geoff</div>
<div><br>
</div>
</div>
</blockquote>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
LLVM Developers mailing list
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<pre cols="72">--
<a href="https://flowcrypt.com/pub/stefan.graenitz@gmail.com" target="_blank">https://flowcrypt.com/pub/stefan.graenitz@gmail.com</a></pre>
</div>
</blockquote></div>