<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 Dec 5, 2020, at 10:18 AM, Christopher Jones <<a href="mailto:jonesc@hep.phy.cam.ac.uk" class="">jonesc@hep.phy.cam.ac.uk</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi,<br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On 5 Dec 2020, at 5:20 pm, Eric Borisch <<a href="mailto:eborisch@macports.org" class="">eborisch@macports.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class="">It's part of the LLVM project, and can be built at the same time (<span style="font-family:monospace" class="">-DLLVM_ENABLE_PROJECTS=openmp)</span>as other tools; I think losing OpenMP support for MP's clang by default is a step backwards, but most of the google results for "clang openmp mac" point you to homebrew anyway, so perhaps it doesn't matter.</div></div></div></blockquote><div class=""><br class=""></div><div class="">No one is suggestion removing support for it, just a different way of packaging. To be honest having openmp as a port external to the LLVM ports has never made complete sense to me.</div><div class=""><br class=""></div><div class="">Currently the way the LLVM suite of ports are built is a bit peculiar and frankly a bit of a relic from SVN days and doesn’t use the <span style="font-family: monospace;" class="">LLVM_ENABLE_PROJECTS option to enable components. I believe Ken has looked into using this to simplify the builds, which I think would be good, and then enabling it would be a lot </span><font face="monospace" class="">simpler than it currently is. Doing this for all the current LLVM versions is not really practical but perhaps for a future release (maybe an update to 11) we should move to this way of building thing, and then for that version remove the external libomp port dep. and just build it as part of the LLVM port itself.</font></div><div class=""><font face="monospace" class=""><br class=""></font></div><div class=""><font face="monospace" class="">Chris</font></div></div></div></div></blockquote><div><br class=""></div><div><br class=""></div><div>LLVM has two methods for specifying what you want built. The older method is to put things as subfolders (either “projects” or “tool”) of the llvm folder. That is what Jeremy set up, and that is what all the patches, reinplaces, tweaking, python rewriting, destrooting, etc is set up to do now.</div><div><br class=""></div><div>The new method is to use the “monorepo” build with everything on the same level, and then you LLVM_ENABLE_PROJECTS what you you want to build.</div><div><br class=""></div><div>I had that working a year ago, and showed Chris then.</div><div><br class=""></div><div>The problem is not so much the patches — those are an hour to fix — or the reinplaces, etc — longer maybe, but still just legwork.</div><div><br class=""></div><div>The problem is how to fracture up the installation of the LLVM subports the way we want them to be. For example, we want to install LLVM alone, without anything else — that’s easy. We want to install only clang, and nothing else. That’s harder — I don’t think there is an available target to do that — I have looked for it, and you can’t just install clang. You always get llvm too. And etc.</div><div><br class=""></div><div>So perhaps we might be able to  LLVM_ENABLE_PROJECTS for the things we want to build, and then maybe go into the subfolders inside the build folder and run the destroot command from in that subfolder (kinda like what we do now, to be honest) and maybe that would install only what we need, and not the rest.</div><div><br class=""></div><div>And that is my next project, because without doing  LLVM_ENABLE_PROJECTS we will never be able to do a full bootstrap build, which we should do (build clang makes -> throwaway clang makes -> real clang we install).</div><div><br class=""></div><div>However, THAT project is DOA until we come to some conclusion about how to fix the years-old MacPorts ncurses problem that prevents any MODULES from being used EVER — so until we decide how to fix that, we can never do a bootstrap build anyway, and the rest is really moot.</div><div><br class=""></div><div>So I set up the symlink system to use the monorepo to replicate the llvm subfolder build method, which is working nicely, as you can see, and made adding flang trivial. It would also make adding libomp trivial , but Eric has been doing such a stellar job of that I just saw no need to change it.</div><div><br class=""></div><div>Until recently when we had a build failure, which turned out, in the end, for now to be trivial to fix.</div><div><br class=""></div><div>So we’re good for another few years, until the next crisis. </div><div><br class=""></div><div>And I’ll move our llvm / etc builds to the  LLVM_ENABLE_PROJECTS method, rewrite all the patches, rewrite all the reinplaces, and figure out the new method of doing partial destrooting — but in the end it will make absolutely not the slightest bit of different to anyone, as the installed products will be identical.</div><div><br class=""></div><div>Ken</div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div><br class=""></div><div><br class=""></div></div></body></html>