[PATCH] D74376: [gn build] Make build fully deterministic

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 10 18:57:47 PST 2020


thakis created this revision.
thakis added reviewers: phosek, rnk.
Herald added subscribers: mgrang, hiraditya.
Herald added a project: LLVM.

This follows http://blog.llvm.org/2019/11/deterministic-builds-with-clang-and-lld.html
to make the GN build fully 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 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.


https://reviews.llvm.org/D74376

Files:
  llvm/utils/gn/.gitignore
  llvm/utils/gn/build/BUILD.gn
  llvm/utils/gn/build/libs/xml/BUILD.gn
  llvm/utils/gn/build/toolchain/BUILD.gn
  llvm/utils/gn/docs/deterministic.md
  llvm/utils/gn/secondary/llvm/lib/DebugInfo/PDB/enable_dia.gni

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74376.243714.patch
Type: text/x-patch
Size: 10564 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200211/5bc80668/attachment.bin>


More information about the llvm-commits mailing list