<div dir="ltr">Done. I'd link the reply but none of the perl5-porters archives seems to work, so copying here:<div><br></div><div><div>bulk88 <<a href="mailto:bulk88@hotmail.com">bulk88@hotmail.com</a>></div><div>8:19 AM (2 hours ago)</div><div><br></div><div>to me, perl5-porters </div><div><br></div><div><span style="font-size:12.8000001907349px">I tried a cl clang build about 1.5 years ago, some things had to be fixed in /win32, colored warnings and errors were interesting with clang. I never published the patch and I deleted it or lost it.</span><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">A big design choice with using llvm on win32 is, what toolchain is clang supposed to use on Win32 Perl? clang with MS SDK and cl.exe/VC emulation, or clang with mingw headers and gcc emulation?</span><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">Next question, who will maintain such a port? I added ICC on Win32 build (ICC on Win32 pretends its VC), but the build isn't completely perfect (it fails a FP math test), and it doesn't use ICC's __regcall calling convention and it is missing ICC's long double support.</span><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">Now about that ticket/selectany on anon type, all Visual Cs compile that code. Anonymous types are standard features of C/C++. The fact that clang cl can't generate a C++ symbol name for the var while MS cl.exe can is a bug. The C++ mangled name of __PL_nan_u is "?__PL_nan_u@@3T__unnamed@@B" on 32 bit VC 2003.</span><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">3=unqualified type</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">T=Complex Type (union)</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">B=const</span><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">------------------------------</span><span style="font-size:12.8000001907349px">----------------------------</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">C:\>UNDNAME.EXE ?__PL_nan_u@@3T__unnamed@@B</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">Microsoft (R) C++ Name Undecorator</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">Copyright (C) Microsoft Corporation 1981-2001. All rights reserved.</span><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">Undecoration of :- "?__PL_nan_u@@3T__unnamed@@B"</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">is :- "union __unnamed const __PL_nan_u"</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">C:\></span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">------------------------------</span><span style="font-size:12.8000001907349px">----------------------------</span><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">Here is another bug in clang.</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">I changed the line to extern __declspec( dllexport ) const union { unsigned __int64 __q; double __d; }</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">__PL_nan_u = { 0x7FF8000000000000UI64 };</span><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">then recompiled, result is a fatal error with clang-cl.exe but not with cl.exe.</span><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">------------------------------</span><span style="font-size:12.8000001907349px">----------------------------</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">clang-cl -c -nologo -GF -W3 -TP -EHsc -I..\lib\CORE -I.\include -I. -I.. -DWIN32</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px"> -D_CONSOLE -DNO_STRICT -DPERLDLL -DPERL_CORE -O1 -MD -Zi -DNDEBUG -</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">DPERL_EXTERNAL_GLOB -DPERL_IS_MINIPERL -Fomini\av.obj ..\av.c</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">In file included from ..\av.c:24:</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">In file included from ../perl.h:28:</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">.\config.h(3008,29) : warning: '/*' within block comment [-Wcomment]</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">/*#define PERL_MALLOC_WRAP /**/</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px"> ^</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">In file included from ..\av.c:24:</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">In file included from ../perl.h:3060:</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">.\win32.h(286,1) : error: '__PL_nan_u' must have external linkage when declared</span><br style="font-size:12.8000001907349px"><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px"> 'dllexport'</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">__PL_nan_u = { 0x7FF8000000000000UI64 };</span><br style="font-size:12.8000001907349px"><span style="font-size:12.8000001907349px">^</span><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 24, 2015 at 10:06 PM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</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"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Fri, Jul 24, 2015 at 12:05 PM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</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"><div class="gmail_extra"><div class="gmail_quote"><span>On Thu, Jul 16, 2015 at 8:08 AM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</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"><div class="gmail_extra"><div class="gmail_quote"><span>On Wed, Jul 15, 2015 at 10:45 AM, Russell Wallace <span dir="ltr"><<a href="mailto:russell.wallace@gmail.com" target="_blank">russell.wallace@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>Basic test results on Windows 7, visual studio 2013 (64 bit):</div><div><br></div><div>Build clang with visual studio - okay</div><div><br></div><div>Build clang with itself - okay</div><div><br></div><div>Build Python - okay</div><div><br></div><div>Build Ruby - fails on conftest.c, but 3.6 also failed so this is not a regression bug</div><div><br></div><div>Build Perl - fails. 3.6 also failed, but I think the error message was different, so this could be a regression bug but hopefully it's actually an improvement. Current error message:</div><div><br></div><div> cl -c -I. -nologo -GF -W3 -I..\lib\CORE -I.\include -I. -I.. -DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64 -DCONSERVATIVE -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DPERLDLL -DPERL_CORE</div><div> -O1 -MD -Zi -DNDEBUG -GL -fp:precise -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -TP -EHsc -Foperllib.obj perllib.c</div><div>clang-cl.exe: warning: argument unused during compilation: '-GL'</div><div>In file included from perllib.c:10:</div><div>In file included from ..\lib\CORE\perl.h:3060:</div><div>In file included from .\win32thread.h:4:</div><div>./win32.h(284,25) : error: 'selectany' can only be applied to data items with external linkage</div></div></blockquote><div><br></div></span><div>That line is:</div><div><div>extern const __declspec(selectany) union { unsigned __int64 __q; double __d; } __PL_nan_u = { 0x7FF8000000000000UI64 };</div></div><div><br></div><div>If it's written like so, clang-cl accepts it:</div><div><div>union U { unsigned __int64 __q; double __d; };</div><div>extern const __declspec(selectany) U __PL_nan_u = { 0x7FF8000000000000UI64 };</div></div><div><br></div><div>I guess cl.exe applies the declspec to __PL_nan_u while we try to apply it to the type? (Even though it's written before "union", so according to <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__msdn.microsoft.com_en-2Dus_library_dabb5z75.aspx&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=zR9ypyANYaPIsxpN3cfAPztSUg01LIPj98aKYxI6fkM&s=_hqbSL5PUo2Kx4_1wMvbQARa3wWcxDhBN0WssnWT6_Y&e=" target="_blank">https://msdn.microsoft.com/en-us/library/dabb5z75.aspx</a> it should apply to the variable.) Is there a bug filed for this?</div></div></div></div></blockquote><div><br></div></span><div>(Filed <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D24251&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=zR9ypyANYaPIsxpN3cfAPztSUg01LIPj98aKYxI6fkM&s=p3_9JlBrPH0aF9yZDOc7eYJivPEDAg1dgf9N1h4GVc8&e=" target="_blank">https://llvm.org/bugs/show_bug.cgi?id=24251</a>)</div></div></div></div></blockquote><div><br></div></span><div>After some discussion on that bug, we think it'd be better if perl could change that header, given that it's pretty new code (see the bug above for details). Russel, could you try to reach out to upstream perl?</div><div><div class="h5"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span><div dir="ltr"><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><span>On Wed, Jul 15, 2015 at 1:25 AM, Hans Wennborg <span dir="ltr"><<a href="mailto:hans@chromium.org" target="_blank">hans@chromium.org</a>></span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span>Hi all,<br>
<br>
The 3.7 release branch was created from trunk at r242221 today (around<br>
10:40 pm UTC).<br>
<br>
Branch policy:<br>
<br>
- Any doc changes can go in. Updates to the release notes are highly<br>
encouraged, and should be committed directly to the branch.<br>
<br>
- All other patches should be approved by the release manager (me) and<br>
the appropriate code owner. To get a change merged, commit it to<br>
trunk, and then reply to the commit email with myself and the code<br>
owner cc'd, asking for approval.<br>
<br>
- Fixes to complete existing features may be merged. However, the<br>
features must be completed before Phase II of testing starts,<br>
otherwise they should be disabled. If you recently committed something<br>
experimental to trunk, please make sure it's disabled on the branch.<br>
<br>
- For any bug fixes that you think might apply to the release branch,<br>
please cc me on the commit message.<br>
<br>
Cheers,<br>
Hans<br>
_______________________________________________<br></span><span>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" rel="noreferrer" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</span></blockquote></div><br></div>
<br></span>_______________________________________________<br>
lldb-dev mailing list<br>
<a href="mailto:lldb-dev@cs.uiuc.edu" target="_blank">lldb-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev</a><br>
<br></blockquote></div><br></div></div>
</blockquote></div></div></div><br></div></div>
</blockquote></div></div></div><br></div></div>
</blockquote></div><br></div>