Skip to content

Commit 4e67f9c

Browse files
committed
Write deterministic archives
Currently, `rustc` generates nondeterministic archives, which contain system timestamps. These don't really serve any useful purpose, and enabling deterministic archives moves us a little closer to completely deterministic builds. For a small toy library using `std::ops::{Deref,DerefMut}`, this change actually results in a bit-for-bit identical build every time.
1 parent 8d91bbd commit 4e67f9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rustllvm/ArchiveWrapper.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ LLVMRustWriteArchive(char *Dst,
168168
Members.push_back(NewArchiveIterator(Member->child, Member->name));
169169
}
170170
}
171-
auto pair = writeArchive(Dst, Members, WriteSymbtab, Kind, false);
171+
auto pair = writeArchive(Dst, Members, WriteSymbtab, Kind, true);
172172
if (!pair.second)
173173
return 0;
174174
LLVMRustSetLastError(pair.second.message().c_str());

0 commit comments

Comments
 (0)