<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Courier;
panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style></head><body lang=EN-US link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><div><p class=MsoNormal style='margin-left:.5in'>You misunderstood my message.<o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#0070C0'>My apologies, and thank you for clarifying.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:.5in'> I never intended to leave it at the broken state for MacPort but I am leaning towards finding a correct solution while I suggest some feasible workaround for you. <o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#0070C0'>Thank you!<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#0070C0'>But it seems that adding a custom target in CMake via </span><span style='font-size:12.0pt;font-family:Courier;color:#0070C0'>add_custom_target()</span><span style='font-size:12.0pt;color:#0070C0'> would fix the MacPort version, while staying harmless on the other platforms? Or am I missing something…?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:.5in'>The workaround I provide early will not break M1 mac support since arm64e architecture is experimental and not ABI stable and it is only meant for security researchers to evaluate the implementation.<o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#0070C0'>It looks like Macports team would prefer a different workaround.<o:p></o:p></span></p></div><div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'>After some closer look at the build, it seems that the problem only occurs in makefile build, while ninja doesn't even have the race condition since the create_symlink command only ran once. <o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#0070C0'>Yes, I concur (though the Macports maintainers of the Clang port are the “authoritative” source here, not me </span><span style='font-size:12.0pt;font-family:"Apple Color Emoji";color:#0070C0'>😉</span><span style='font-size:12.0pt;color:#0070C0'>).<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:.5in'>This might be a limitation/bug on the makefile generator, which it lists create_symlink command in both: projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins_arm64_osx.dir/build.make and projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins_arm64e_osx.dir/build.make. I don't know enough about CMake to comment on that. <o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#0070C0'>Neither do I. But it looks like that bug (or limitation? Whatever it might be…) gets side-stepped by </span><span style='font-size:12.0pt;font-family:Courier;color:#0070C0'>add_custom_target()</span><span style='font-size:12.0pt;color:#0070C0'>. Which is why I’m advocating for applying that workaround now, until (and if!) a better one arrives.<o:p></o:p></span></p></div><div><p class=MsoNormal style='margin-left:.5in'><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-left:.5in'>We also do not have CI system to test makefile support on darwin at all so we might not catch problem of this kind in the future. It might be better to investigate to switch to ninja build to avoid troubles down the road.<o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#0070C0'>Understood. Unfortunately, moving to </span><span style='font-size:12.0pt;font-family:Courier;color:#0070C0'>ninja</span><span style='font-size:12.0pt;color:#0070C0'> is not my call at all. </span><span style='font-size:12.0pt;font-family:"Apple Color Emoji";color:#0070C0'>☹</span><span style='font-size:12.0pt;color:#0070C0'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#0070C0'>I suspect that the maintainers are concerned that there already are many dependencies (e.g., full Perl) required to build Clang. Not sure if they’d be happy about pulling ninja in as well – plus, </span><span style='font-size:12.0pt;font-family:Courier;color:#0070C0'>ninja</span><span style='font-size:12.0pt;color:#0070C0'> may require other python packages installed to run the build…?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#0070C0'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;color:#0070C0'>Thanks!<o:p></o:p></span></p></div><div><div><p class=MsoNormal><o:p> </o:p></p></div></div></div></body></html>