The execution environment that all BinaryBuilder.jl builds are executed within is referred to as the "root filesystem" or RootFS. This RootFS is built using the builder scripts contained within the 0_Rootfs directory within Yggdrasil. The rootfs image is based upon the alpine docker image, and is used to build compilers for every target platform we support. The target platform compiler toolchains are stored within /opt/${triplet}, so the 64-bit Linux (using glibc as the backing libc) compilers would be found in /opt/x86_64-linux-gnu/bin.

Each compiler "shard" is packaged separately, so that users do not have to download a multi-GB tarball just to build for a single platform. There is an overall "root" shard, along with platform support shards, GCC shards, an LLVM shard, Rust shards, etc... These are all embedded within the Artifacts.toml file in BinaryBuilderBase.jl, and BinaryBuilder.jl downloads them on-demand as necessary, making use of the new Pkg.Artifacts system within Julia 1.3+.

Each shard is made available both as an unpacked directory tree, and as a .squashfs image. .squashfs images take up significantly less disk space, however they unfortunately require root privileges on the host machine, and only work on Linux. This will hopefully be fixed in a future Linux kernel release, but if you have sudo privileges, it is often desirable to use the .squashfs files to save network bandwidth and disk space. See the Environment Variables for instructions on how to do that.

When launching a process within the RootFS image, BinaryBuilder.jl sets up a set of environment variables to enable a target-specific compiler toolchain, among other niceties. See the Build Tips doc page for more details on that, along with the src/Runner.jl file within this repository for the implementation.