llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.05k stars 11.58k forks source link

LLVM 11.0.0 always rebuilds due to VCS revision #47730

Closed hahnjo closed 3 years ago

hahnjo commented 3 years ago
Bugzilla Link 48386
Resolution FIXED
Resolved on Dec 17, 2020 07:59
Version 11.0
OS Linux
Blocks llvm/llvm-project#47144
CC @dwblaikie,@tstellar
Fixed by commit(s) 6e890ec7beb0874464a0af9f84e41a987f968b23 d104e582838f

Extended Description

When building LLVM 11.0.0 from the monorepo source code, I always get a rebuild due to target llvm_vcsrevision_h that generates VCSRevision.h and FakeVCSRevision.h. However, the latter doesn't exist so 'make' always rebuilds that target and all others that depend on it. Touching include/llvm/Support/FakeVCSRevision.h (with empty content) avoids the rebuild, but this should be fixed in CMake since releases are mostly not build from a VCS.

tstellar commented 3 years ago

Merged: d104e582838f

hahnjo commented 3 years ago

Fixed by https://github.com/llvm/llvm-project/commit/6e890ec7beb0874464a0af9f84e41a987f968b23. Tom, do you still want to backport this for 11.0.1? I'll not set this to RESOLVED to keep it on your plate.

hahnjo commented 3 years ago

Patch at https://reviews.llvm.org/D92718, I hope it retains all existing use cases...

hahnjo commented 3 years ago

Was this fixed in trunk? I seem to recall some patches related to this.

There was https://reviews.llvm.org/D82847 in this region (which might be a good idea to pick), but it doesn't solve the problem in a scenario without a git repo (btw, I think a git-worktree might not work either, I'm currently checking this).

tstellar commented 3 years ago

Was this fixed in trunk? I seem to recall some patches related to this.