[gn build] Make build locally deterministic
authorNico Weber <thakis@chromium.org>
Sat, 15 Feb 2020 02:55:33 +0000 (21:55 -0500)
committerNico Weber <thakis@chromium.org>
Sat, 15 Feb 2020 02:55:33 +0000 (21:55 -0500)
commitead0b76382a5a20e8164583d86900de5b3fa9288
tree5f17af588842cc71c913f94c37f563c0b0e01783
parent83bea6d99dd17d893b7160e045700aef6173a49d
[gn build] Make build locally deterministic

This follows http://blog.llvm.org/2019/11/deterministic-builds-with-clang-and-lld.html
to make the GN build locally deterministic.

With this, I've built lld at two different build paths on my Windows box and got
identical binaries. (I'd expect the same to happen on Linux, and with other
binaries.)

This doesn't have the bits to get universal determinism yet.

Differential Revision: https://reviews.llvm.org/D74519
llvm/utils/gn/build/BUILD.gn
llvm/utils/gn/build/toolchain/BUILD.gn
llvm/utils/gn/docs/deterministic.md [new file with mode: 0644]