In GHA cross-compilation, we don't need everything from the sysroot, because we
use native compilers for the compilation. Therefore, we can cut them even
deeper and reclaim significant amount of cache space. This would also make
cache eviction less likely, which saves time on recreating the sysroots when
that happens.
Current sysroots take about 300M per arch, which quickly multiplies up for
multiple arches (we build 5 now) users (ballparking at about 200 active
contributors). This amounts to about 1500M caches per job, and 300G in caches
across our org.
In my local tests, new aarch64 sysroot tar.gz gets reduced from 315M to just
85M, about 3.7x improvement. Even deeper cuts are possible, but they would
affect the redundant `.so`-s in `/usr/lib/${arch}/`. That would be much more
fragile to do and might affect our builds. Therefore, I stopped at doing just
these.
-------------
Commit messages:
- Fix
Changes: https://git.openjdk.org/jdk/pull/10601/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10601&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8294941
Stats: 3 lines in 1 file changed: 2 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/10601.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/10601/head:pull/10601
PR: https://git.openjdk.org/jdk/pull/10601