<div dir="ltr">Any easy way to do this as some kind of overlay, so they GN files wouldn't live in the LLVM repository, but in a separate one?<br><br>(this might avoid some of the community discussion - though would perhaps still likely have the issue I see as most significant: With a sufficient number of developers using GN, the rate of build breaks due to those developers missing CMake file updates might rise to be a bit of a drag on the LLVM project - though I don't think that's likely to ever be a huge deal, just an annoyance)<br><br><div class="gmail_quote"><div dir="ltr">On Wed, Oct 31, 2018 at 11:19 AM Nico Weber via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi,</div><div><br></div><div>first things first: If you're happy with cmake, you can stop reading now. Nobody is proposing that LLVM moves off cmake, and nobody is proposing anything that's causing people using cmake more work.</div><div><br></div><div>At the LLVM conference, I gave a lightning talk [1] about using GN [2] to build LLVM and clang. cmake is great for many use cases, but in my opinion local day-to-day development isn't one of them. So I wrote GN build files for LLVM and clang, enough to make `ninja check-llvm check-clang check-lld` build everything needed for these three test suites and that all tests pass. This works on Linux, Mac, Win hosts targeting X86, ARM, AArch64. You can see them at [3].</div><div><br></div><div>I had been worried that it would be a lot of work to keep the build files up to date, but I've been using this for all my LLVM/clang/lld development the last 8 months, and it turned out to not be a big problem -- LLVM's build files don't change very often, and GN build files are a pleasure to work with in my opinion.</div><div><br></div><div>I gave the lightning talk just to talk about my personal workflow, but there was a lot of interest. We had a roundtable on the next day, and about 20 people said they'd be interested in using this for their development too. The main request was that the .gn files are checked in upstream, so that we can collaborate on keeping them working. Two to three orgs even said they'd be interested in moving their buildbots to GN.</div><div><br>As mentioned at the top, the intention here is not to replace cmake, only to offer an opt-in alternative for people who are interested in it. Keeping the GN build going would be the responsibility of people using it, not of the general LLVM community. If this fails to find use and bitrots, we can easily remove it again.</div><div><br>Are there any concerns with checking in GN files? I've put some initial docs for the GN build at <a href="https://reviews.llvm.org/D53944" target="_blank">https://reviews.llvm.org/D53944</a> ; it describes what the GN build is and is not, what its advantages are (speed and easier configurability), and some points about the philosophy behind the LLVM GN build.</div><div><br></div><div>If folks are generally ok with GN files living in-tree, I'll start sending patches for gradually adding gn files through the regular review process.</div><div><br></div><div>If having a BUILD.gn file in every directory being confusing is a concern, GN has the concept of a "secondary tree" so that all GN files could be below llvm/gn/tree/{llvm,clang,lld,...}.</div><div dir="ltr"><br></div><div>Cheers,</div><div>Nico</div><div dir="ltr"><br></div><div dir="ltr">1: <a href="https://llvm.org/devmtg/2018-10/talk-abstracts.html#lt2" target="_blank">https://llvm.org/devmtg/2018-10/talk-abstracts.html#lt2</a></div><div dir="ltr">2: <a href="https://gn.googlesource.com/gn" target="_blank">https://gn.googlesource.com/gn</a> , <a href="https://is.gd/gn_intro" target="_blank">https://is.gd/gn_intro</a></div><div dir="ltr">3: <a href="https://github.com/llvm-project/llvm-project-20170507/compare/master...nico:gn" target="_blank">https://github.com/llvm-project/llvm-project-20170507/compare/master...nico:gn</a> , click "Files Changed" to see the GN files.</div></div></div></div></div></div></div>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div></div>