[PATCH] D24404: COFF: make builds more reproducible
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 9 10:25:37 PDT 2016
ruiu added inline comments.
================
Comment at: COFF/Writer.cpp:84
@@ -83,3 +83,3 @@
void writeTo(uint8_t *B) const override {
- auto *R = reinterpret_cast<codeview::DebugInfo *>(B + OutputSectionOff);
+ DI = reinterpret_cast<codeview::DebugInfo *>(B + OutputSectionOff);
----------------
Please add a comment saying that we save DI to backfill DI->PDB70.Signature in Writer::writeBuildId.
================
Comment at: COFF/Writer.cpp:87
@@ +86,3 @@
+ DI->Signature.CVSignature = OMF::Signature::PDB70;
+ memset(DI->PDB70.Signature, 0, sizeof(DI->PDB70.Signature));
+ DI->PDB70.Age = 0;
----------------
It's a fresh file, so as long as you don't write anything, zeros are there, so this is a nop.
================
Comment at: COFF/Writer.cpp:98
@@ +97,3 @@
+public:
+ mutable codeview::DebugInfo *DI;
+
----------------
DI = nullptr;
================
Comment at: COFF/Writer.cpp:807
@@ -798,1 +806,3 @@
+void Writer::writeBuildId() {
+ if (BuildId == nullptr)
----------------
Add a comment that why we have this (to fill CVSignature) and why we do this way (to get reproducible outputs.)
Repository:
rL LLVM
https://reviews.llvm.org/D24404
More information about the llvm-commits
mailing list