[llvm-dev] [RFC] One or many git repositories?

Chris Bieneman via llvm-dev llvm-dev at lists.llvm.org
Fri Jul 29 10:04:08 PDT 2016


> On Jul 29, 2016, at 8:53 AM, Daniel Sanders via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> > > Even then, are we seriously ignoring the fact that even if you did clone
> > > the whole repository including everything, that you can still build just
> > > the libc++ and sanitiser runtimes if you wanted to?
> >
> > Is it that easy to build a subset of a large checked-out tree?  I haven't
> > tried it but my impression is: not so much.
>  
> It's possible to disable subsets of an LLVM build by setting the various 'LLVM_TOOL_*_BUILD' options to 'OFF' in cmake. For example, 'LLVM_TOOL_COMPILER_RT_BUILD=OFF' will prevent the build for projects/compiler-rt, and 'LLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=OFF' will disable the tools/projects/clang/tools/extra (I've just double checked the latter). IIRC, these are the variables that disable the build for projects that aren't checked out.
>  
> Also, I haven’t tried this myself but we should still be able to do standalone builds of particular projects by picking the initial CMakeLists.txt like so:
>             cmake ../llvm/projects/compiler-rt

Just as a side point here. This only works for certain projects. The runtimes projects all support standalone builds, as does Clang, and (I think) LLDB. LLD and clang-tools-extra do not. I’m not sure about Polly or the new Parallel Libs project.

One of the side discussions that would need to take place if the monorepo approach is taken would be how people want the build system to behave. It could be modified to disable all the currently optional subprojects and require build options to enable them.

If we moved to a mono-repo where the projects are all side-by-side (as the llvm-project is today) by default you would only get LLVM in your configuration. You’d need to either symlink the other projects into the LLVM repository or specify CMake options to enable them. Alternatively we could include at the root of the mono-repo a CMakeLists file that setup all the sub-projects for convenience, which seems reasonable to me.

-Chris

>  
> From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of Bruce Hoult via llvm-dev
> Sent: 29 July 2016 15:52
> To: Robinson, Paul
> Cc: llvm-dev at lists.llvm.org
> Subject: Re: [llvm-dev] [RFC] One or many git repositories?
>  
>  
>  
> On Sat, Jul 30, 2016 at 2:26 AM, Robinson, Paul via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
> 
> > Even then, are we seriously ignoring the fact that even if you did clone
> > the whole repository including everything, that you can still build just
> > the libc++ and sanitiser runtimes if you wanted to?
> 
> Is it that easy to build a subset of a large checked-out tree?  I haven't
> tried it but my impression is: not so much.  Certainly the advertised
> tactics for configuring/building don't tell you how to do that.  Somebody
> figuring out what it takes would be very constructive here, instead of
> just asserting it can't possibly be that hard.
>  
> Right now, no. The build system assumes that if you checked someone out then you want to build it.
>  
> This needs to change.
>  
>  I believe David Chisnall up-thread cited a difference in checkout times
> on the order of a handful of seconds versus a couple of minutes.  While
> naively it might seem not a big deal, over time and depending on what you
> are trying to do yes it can be a big burden
>  
> That's a one time cost, not every time you do an update.
>  
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160729/db38b6b0/attachment-0001.html>


More information about the llvm-dev mailing list