<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jul 19, 2021, at 11:29 AM, Blumenthal, Uri - 0553 - MITLL <<a href="mailto:uri@ll.mit.edu" class="">uri@ll.mit.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta charset="UTF-8" class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">You misunderstood my message.<o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt; color: rgb(0, 112, 192);" class="">My apologies, and thank you for clarifying.<o:p class=""></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">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.<span class="Apple-converted-space"> </span><o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt; color: rgb(0, 112, 192);" class="">Thank you!<o:p class=""></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt; color: rgb(0, 112, 192);" class="">But it seems that adding a custom target in CMake via<span class="Apple-converted-space"> </span></span><span style="font-size: 12pt; font-family: Courier; color: rgb(0, 112, 192);" class="">add_custom_target()</span><span style="font-size: 12pt; color: rgb(0, 112, 192);" class=""><span class="Apple-converted-space"> </span>would fix the MacPort version, while staying harmless on the other platforms? Or am I missing something…?</span></div></div></div></div></blockquote><div><br class=""></div><div>Can you propose a patch for that? I will happily review and commit it for you.</div><div><br class=""></div><div>Steven</div><br class=""><blockquote type="cite" class=""><div class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div class=""><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt; color: rgb(0, 112, 192);" class=""><o:p class=""></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">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 class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt; color: rgb(0, 112, 192);" class="">It looks like Macports team would prefer a different workaround.<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">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.<span class="Apple-converted-space"> </span><o:p class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt; color: rgb(0, 112, 192);" class="">Yes, I concur (though the Macports maintainers of the Clang port are the “authoritative” source here, not me<span class="Apple-converted-space"> </span></span><span style="font-size: 12pt; font-family: "Apple Color Emoji"; color: rgb(0, 112, 192);" class="">😉</span><span style="font-size: 12pt; color: rgb(0, 112, 192);" class="">).<o:p class=""></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">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 class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt; color: rgb(0, 112, 192);" class="">Neither do I. But it looks like that bug (or limitation? Whatever it might be…) gets side-stepped by<span class="Apple-converted-space"> </span></span><span style="font-size: 12pt; font-family: Courier; color: rgb(0, 112, 192);" class="">add_custom_target()</span><span style="font-size: 12pt; color: rgb(0, 112, 192);" class="">. Which is why I’m advocating for applying that workaround now, until (and if!) a better one arrives.<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0in 0in 0in 0.5in; font-size: 11pt; font-family: Calibri, sans-serif;" class="">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 class=""></o:p></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt;" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt; color: rgb(0, 112, 192);" class="">Understood. Unfortunately, moving to<span class="Apple-converted-space"> </span></span><span style="font-size: 12pt; font-family: Courier; color: rgb(0, 112, 192);" class="">ninja</span><span style="font-size: 12pt; color: rgb(0, 112, 192);" class=""><span class="Apple-converted-space"> </span>is not my call at all.<span class="Apple-converted-space"> </span></span><span style="font-size: 12pt; font-family: "Apple Color Emoji"; color: rgb(0, 112, 192);" class="">☹</span><span style="font-size: 12pt; color: rgb(0, 112, 192);" class=""><o:p class=""></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt; color: rgb(0, 112, 192);" class="">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 class="Apple-converted-space"> </span></span><span style="font-size: 12pt; font-family: Courier; color: rgb(0, 112, 192);" class="">ninja</span><span style="font-size: 12pt; color: rgb(0, 112, 192);" class=""><span class="Apple-converted-space"> </span>may require other python packages installed to run the build…?<o:p class=""></o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt; color: rgb(0, 112, 192);" class=""><o:p class=""> </o:p></span></div><div style="margin: 0in; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 12pt; color: rgb(0, 112, 192);" class="">Thanks!</span></div></div></div></div></blockquote></div><br class=""></body></html>