This is an archive of the discontinued LLVM Phabricator instance.

[gn build] replace llvm_allow_tardy_revision with llvm_append_vc_rev
ClosedPublic

Authored by thakis on Jan 16 2020, 11:06 AM.

Details

Summary

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.

Diff Detail

Event Timeline

thakis created this revision.Jan 16 2020, 11:06 AM
Herald added a project: Restricted Project. · View Herald Transcript
phosek accepted this revision.Jan 16 2020, 12:10 PM

LGTM

This revision is now accepted and ready to land.Jan 16 2020, 12:10 PM
This revision was automatically updated to reflect the committed changes.