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

Bruce Hoult via llvm-dev llvm-dev at lists.llvm.org
Fri Jul 22 15:15:01 PDT 2016


On Sat, Jul 23, 2016 at 9:04 AM, Tim Northover via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> On 22 July 2016 at 13:48, Piotr Padlewski via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> >> The build system can help, you just need to have two (sparse) checkout:
> one for LLVM/clang and the other for clang-tidy, and configure the build
> with the LLVM/clang checkout adding the clang-tidy as external.
>
> > Can you describe it more?
>
> Something like this
>
> $ git clone git at github.com:llvm/llvm.git
> $ git clone git at github.com:llvm/llvm.git clang-tools-extras
>

That 2nd clone is better as either:

$ git clone ./llvm clang-tools-extras

or

$ cd llvm
$ git worktree add ../clang-tools-extras

Both result in (initially) sharing one copy of the repository.

With the first, the llvm directory is the origin for the clang-tools-extras
directory, and after committing in clang-tools-extras you need to push to
origin (the llvm dir), and then to github. Or add github as another remote
for the clang-tools-extras checkout and push directly to it.

With the second version, commits in both checkouts go to the exact same
repository. In this case you are forced to have different branches checked
out in each directory -- the worktree add command automatically creates a
new branch called clang-tools-extras and the 2nd checkout is on it.


> $ <make the clang-tools sparse if you want, doesn't seem strictly
> necessary though>
> $ mkdir build && cd build
> $ cmake ../llvm
>
> -DLLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR=../clang-tools-extras/tools/clang/tools/clang-tools-extras
> $ make
>
> > I don't get the approach, but it seems we are trying to make it easier
> to use llvm, but in the same time we are making it harder.
>
> As Justin said, this isn't an issue for the majority of developers and
> it's a solvable problem for you.
>
> > BTW Does anyone knows why cmake is reloading each time I update
> llvm/clang repo? I hope that both approaches would solve this problem,
> because it doesn't seem like a something that should happen.
>
> It reconfigures every time a CMakelists.txt file used in the build is
> changed, which is unavoidable as far as I'm aware.
>
> Cheers.
>
> Tim.
> _______________________________________________
> 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/20160723/b1ce37e7/attachment.html>


More information about the llvm-dev mailing list