Skip to content

Commit

Permalink
Perform shallow clones of submodules
Browse files Browse the repository at this point in the history
Greatly reduces the time it takes to checkout the various submodules, and also reduces required storage.

Signed-off-by: Nick Kossifidis <[email protected]>
  • Loading branch information
mickflemm committed Nov 2, 2024
1 parent 243cd18 commit bd33836
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,56 @@
path = binutils
url = https://sourceware.org/git/binutils-gdb.git
branch = binutils-2_43-branch
shallow = true
[submodule "gcc"]
path = gcc
url = https://gcc.gnu.org/git/gcc.git
branch = releases/gcc-14
shallow = true
[submodule "glibc"]
path = glibc
url = https://sourceware.org/git/glibc.git
shallow = true
[submodule "dejagnu"]
path = dejagnu
url = https://git.savannah.gnu.org/git/dejagnu.git
branch = master
shallow = true
[submodule "newlib"]
path = newlib
url = https://sourceware.org/git/newlib-cygwin.git
branch = master
shallow = true
[submodule "gdb"]
path = gdb
url = https://sourceware.org/git/binutils-gdb.git
branch = gdb-15-branch
shallow = true
[submodule "qemu"]
path = qemu
url = https://gitlab.com/qemu-project/qemu.git
shallow = true
[submodule "musl"]
path = musl
url = https://git.musl-libc.org/git/musl
branch = master
shallow = true
[submodule "spike"]
path = spike
url = https://github.com/riscv-software-src/riscv-isa-sim.git
branch = master
shallow = true
[submodule "pk"]
path = pk
url = https://github.com/riscv-software-src/riscv-pk.git
branch = master
shallow = true
[submodule "llvm"]
path = llvm
url = https://github.com/llvm/llvm-project.git
branch = release/17.x
shallow = true
[submodule "uclibc-ng"]
path = uclibc-ng
url = https://git.uclibc-ng.org/git/uclibc-ng.git
url = https://github.com/wbx-github/uclibc-ng.git
shallow = true
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ endif
$(srcdir)/%/.git:
cd $(srcdir) && \
flock `git rev-parse --git-dir`/config git submodule init $(dir $@) && \
flock `git rev-parse --git-dir`/config git submodule update --progress $(dir $@)
flock `git rev-parse --git-dir`/config git submodule update --progress --depth 1 $(dir $@)

stamps/install-host-gcc: $(GCC_SRCDIR) $(GCC_SRC_GIT)
if test -f $</contrib/download_prerequisites && test "@NEED_GCC_EXTERNAL_LIBRARIES@" = "true"; then cd $< && ./contrib/download_prerequisites; fi
Expand Down

0 comments on commit bd33836

Please sign in to comment.