Closed TShapinsky closed 3 weeks ago
Thanks for the PR!
Another side-effect of this is that we download less and speed up the git clone steps.
Looks like we need to adjust the .gitmodules
file as well:
fatal: Fetched in submodule path 'binutils', but it did not contain beb2cdbcda911764b2bed5e57921fe90493260bd. Direct fetching of that commit failed.
CI/CD shows the following error:
fatal: Fetched in submodule path 'binutils', but it did not contain beb2cdbcda911764b2bed5e57921fe90493260bd. Direct fetching of that commit failed.
Thanks. I'll see if I can reproduce that locally
Closing while I test so I don't generate too many actions issues
Added
--depth 1
to thegit submodule update
command inMakefile.in
.To test I setup a docker image which built the repository with
./configure --prefix=/opt/riscv --with-arch=rv32gc --with-abi=ilp32d
. The image with this change was 14.77 GB where as the version without this change was 16.93 GB. That is a savings of 2.16 GB. This won't be a big deal for people developing in a stable environment where they only init the submodules once, but for cases where the build is happening in a container this is a big gain.A different approach would be to populate the
shallow
property in.gitmodules
. However, this approach only saves about 100MB, perhaps because theshallow
property is not applied recursively.