Suppress version control revision info (Git revision id) is appended
See original GitHub issueEach time I build a new toolchain via tc-build the current Git revision id
is appended and changes when llvm-project Git updates.
--- /boot/config-5.7.0-rc1-5-amd64-clang
+++ .config
-# Compiler: ClangBuiltLinux clang version 10.0.1 (https://github.com/llvm/llvm-project 61b6007157600d8080b87361397bb61ffbcfb196)
+# Compiler: ClangBuiltLinux clang version 10.0.1 (https://github.com/llvm/llvm-project edbe962459da6e3b7b4168118f93a77847b54e02)
The CCACHE benefit is gone as Linux build-system detects the change of compiler.
There exists LLVM_APPEND_VC_REV
(default: ON) cmake-option to suppress this:
LLVM_APPEND_VC_REV:BOOL
Embed version control revision info (Git revision id). The version info is provided by the LLVM_REVISION macro in llvm/include/llvm/Support/VCSRevision.h. Developers using git who don’t need revision info can disable this option to avoid re-linking most binaries after a branch switch. Defaults to ON.
What do you think of integrating an option for this in tc-build
?
[1] https://llvm.org/docs/CMake.html#llvm-specific-variables
Issue Analytics
- State:
- Created 3 years ago
- Comments:25 (25 by maintainers)
Top Results From Across the Web
What is the Git equivalent for revision number? - Stack Overflow
@Radek Yes it is an ever increasing number. It just counts the revisions you checked in on the HEAD. So every commit is...
Read more >7.1 Git Tools - Revision Selection
This command shows you any commits in your current branch that aren't in the master branch on your origin remote. If you run...
Read more >git-rev-list Documentation - Git
rev-list is a very essential Git command, since it provides the ability to build and traverse commit ancestry graphs. For this reason, it...
Read more >git-describe Documentation - Git
The command finds the most recent tag that is reachable from a commit. If the tag points to the commit, then only the...
Read more >git-blame Documentation - Git
Annotates each line in the given file with information from the revision which ... This makes it possible to track when a code...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@msfjarvis Thanks for the patch. I will try it and report.
The comment is not precise enough.
This can be changed later.
I do not think that the revision info in the compiler string matters for the sake of ccache, unless you have changed something.
According to the
ccache
docs (https://ccache.dev/manual/latest.html#_configuration_settings):If you build a new compiler, the mtime will change (and probably the size in some small way) and ccache will be invalidated, regardless of the version string in the compiler.