diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2016-04-01 05:33:11 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-04-01 05:33:11 +0000 |
commit | d2f4701e4a36488b0f5e3b74aaa4cffa2ad5779e (patch) | |
tree | 46b9043aa0ce96bbb3cce3dd7c6258a4a3b6306f /tools/llvm-as | |
parent | d4b1021e3e46b0773d3793789aa75c9c69514f6d (diff) |
Add a module Hash in the bitcode and the combined index, implementing a kind of "build-id"
This is intended to be used for ThinLTO incremental build.
Differential Revision: http://reviews.llvm.org/D18213
This is a recommit of r265095 after fixing the Windows issues.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265111 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-as')
-rw-r--r-- | tools/llvm-as/llvm-as.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/llvm-as/llvm-as.cpp b/tools/llvm-as/llvm-as.cpp index 7318bfe341d..7e9500a6672 100644 --- a/tools/llvm-as/llvm-as.cpp +++ b/tools/llvm-as/llvm-as.cpp @@ -48,6 +48,9 @@ static cl::opt<bool> EmitSummaryIndex("module-summary", cl::desc("Emit module summary index"), cl::init(false)); +static cl::opt<bool> EmitModuleHash("module-hash", cl::desc("Emit module hash"), + cl::init(false)); + static cl::opt<bool> DumpAsm("d", cl::desc("Print assembly as parsed"), cl::Hidden); @@ -82,7 +85,7 @@ static void WriteOutputFile(const Module *M) { if (Force || !CheckBitcodeOutputToConsole(Out->os(), true)) WriteBitcodeToFile(M, Out->os(), PreserveBitcodeUseListOrder, - EmitSummaryIndex); + EmitSummaryIndex, EmitModuleHash); // Declare success. Out->keep(); |