This follows http://blog.llvm.org/2019/11/deterministic-builds-with-clang-and-lld.html
after ead0b76382a5a to make the GN build fully deterministic, instead of just locally
deterministic.
Getting a fully deterministic build requires some configuration and setup. See
llvm/utils/gn/docs/deterministic.md for details.
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 is not 100% complete yet. A few absolute include paths need to become sysroot-relative
if a sysroot is in use (there are FIXMEs for this), and the sysroot setup is a pain.
I'm sending this out for early feedback. Maybe I should put the sysroot bits in a separate
patch and land only the rest first.
Can this be shortened to use_relative_paths_in_debug_info? It seems descriptive enough. Are there non-deterministic relative paths?