[PATCH] D72859: [gn build] replace llvm_allow_tardy_revision with llvm_append_vc_rev

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 16 11:11:14 PST 2020


thakis created this revision.
thakis added a reviewer: rnk.
Herald added a reviewer: rengolin.
Herald added a project: LLVM.
thakis added a parent revision: D72855: Make LLVM_APPEND_VC_REV=OFF affect clang, lld, and lldb as well..

Previously, the gn build would create VCSRevision.h / VCSVersion.h
files with some LLD_REVISION / LLVM_REVISION / CLANG_REVISION but
by default wouldn't add a dependency on .git/logs/HEAD so that
the step doesn't rerun after every branch switch or every pull.

That's bad for deterministic builds, and having --version print
some arbitrarily old revision isn't great either.

Instead, move to the model that the cmake build (now) uses fairly
consistently: If llvm_append_vc_rev is set, include the revision,
else don't.

Since the GN build is focused on developers, set llvm_append_vc_rev
to false instead of true by default (different from the cmake build),
so that things don't rebuild after every branch switch and every
pull.

While here, also remove some pre-monorepo code.


https://reviews.llvm.org/D72859

Files:
  llvm/utils/gn/build/write_vcsrevision.gni
  llvm/utils/gn/build/write_vcsrevision.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72859.238546.patch
Type: text/x-patch
Size: 4578 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200116/090273e7/attachment.bin>


More information about the llvm-commits mailing list