The config.toml file in rust-lang/rust has the omit-git-hash option,
which prevents git information from being embedded into binaries. This
works for most tools, as they rely on the git information provided by
bootstrap through environment variables.
Cargo does its own git detection in its build script though, which
didn't adhere to to that option. This changes that by skipping git
detection whenever bootstrap signals the option is enabled.
Keep deterministic builds for Cargo! The changes here are:
* Sort files being added to the archive to ensure they're added in the
same order on all platforms.
* Flag the archive builder as "deterministic mode" which means it won't
pick up fields like mtime.
Closes#8599