Toolchain Build Phases
The toolchain builds in two sub-phases:- Bootstrap Phase - Builds an initial bootstrap toolchain from upstream sources
- Final Phase - Uses the bootstrap toolchain to build the final toolchain used in package building
Populate Toolchain (Fast)
The fastest way to get started is to download pre-built toolchain binaries. This happens automatically whenREBUILD_TOOLCHAIN=n (the default).
Populate from binaries
Download and populate the toolchain from pre-existing binaries:This command downloads toolchain packages from packages.microsoft.com and extracts them locally.
This is the recommended approach for most users and takes only a few minutes compared to several hours for a full rebuild.
Rebuild Toolchain (Complete)
For a complete from-scratch build, you can rebuild the entire toolchain. Depending on hardware, this can take several hours.Incremental Toolchain Builds
When modifying toolchain packages, you can use incremental builds to save time:- Downloads as many toolchain RPMs as possible from upstream
- Only rebuilds the packages that have changed locally
- Significantly reduces build time compared to a full rebuild
Using Daily Build Toolchain
You can use toolchain packages from daily builds:Common Toolchain Variables
REBUILD_TOOLCHAIN
n(default) - Download pre-built toolchain packagesy- Build toolchain from scratch
REBUILD_TOOLS
n(default) - Use pre-compiled Go binaries from SDKy- Build Go tools from source
INCREMENTAL_TOOLCHAIN
n(default) - Full clean rebuild of toolchainy- Reuse existing toolchain RPMs where possible
ALLOW_TOOLCHAIN_DOWNLOAD_FAIL
n(default) - Don’t download toolchain packages during incremental buildsy- Download and cache as many toolchain packages as possible
Toolchain Package Sources
By default, toolchain packages are downloaded from:Caching Toolchain Artifacts
To save toolchain artifacts for reuse:Next Steps
After the toolchain is built or populated, proceed to:- Package Build Stage - Build Azure Linux packages
- Review Build Variables for more configuration options