hooks: force re-emerge libcxx

This CL implements a new chroot hook that triggers a re-emerge of
libcxxabi and libcxx. It also adds a call to make_chroot to
emerge these before building other packages.

This is required to support the transition of these packages to a
single LLVM runtime build. Runtime builds are now the only supported
way to build these packages with LLVM, but switching to runtimes
in www.crrev.com/c/3402181 has problems with the new locations not
existing in the chroot. For existing chroots, the chroot hook alleviates
this problem, and for new chroots (such as builders) the changes in
make_chroot.sh are required.

We cannot completely remove the libcxxabi ebuild because it is a
dependency in many packages without creating a new toolchain with
SDKBuilder. If libcxxabi and libcxx are emerged in parallel with all
other packages, the missing libcxxabi files will cause a linker error
until the libc++ package is finished building. Using these hooks is
necessary to make sure that libcxx is built ahead of other packages
since setting dependencies and blockers will not prevent parallel
builds.

BUG=b:204093890
TEST=CQ, run locally

Cq-Depend: chromium:3402181
Change-Id: I36d879e306d5f6f54c9a80db46fc5342bcfde77b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosutils/+/3511442
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Feels: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
3 files changed