We advise the usage of Nix and Nix Flakes to build TC. The versions of all packages used in the build environment are pinned. The nix configuration is specified in a flake.nix file, and versions of packages are described in flake.lock.

$ nix build .#tc

Nix builds the package tc for the current system in use. The default package tc is compiled by gcc and the package tcClang is TC compiled by clang.

Moreover, Nix Flakes provide a way to have a shell containing the build environment. In fact, one can simply use:

$ nix develop

This command creates and activates a shell with packages as listed in flake.nix. This allows us to develop TC in a reproducible environment.

Note that Nix Flakes are still an upcoming feature of Nix and may thus be subject to change in the future.