See the comments on the top of main.go. Build is split into 2 steps via separate commands:
build.py
file into a folder.bundle.py
.This allows to copy the sources to a Chrome OS / Android package, including the build script, and then build from there without a dependency on toolchain-utils itself.
Copy over sources and build.py
to Chrome OS:
(chroot) /mnt/host/source/src/third_party/chromiumos-overlay/sys-devel/llvm/files/update_compiler_wrapper.sh
build.py
is called by these ebuilds:
Generated wrappers are stored here:
/usr/x86_64-pc-linux-gnu/<arch>/gcc-bin/4.9.x/sysroot_wrapper.hardened.ccache
/usr/x86_64-pc-linux-gnu/<arch>/gcc-bin/4.9.x/sysroot_wrapper.hardened.noccache
/usr/bin/clang_host_wrapper
/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.x/host_wrapper