This is an archive of the discontinued LLVM Phabricator instance.

[lld/mac] Don't write mtimes to N_OSO entries if ZERO_AR_DATE is set.
ClosedPublic

Authored by thakis on Jun 1 2021, 3:56 AM.

Details

Summary

This is important for build determinism. This matches ld64.

Diff Detail

Event Timeline

thakis created this revision.Jun 1 2021, 3:56 AM
Herald added a reviewer: gkm. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
thakis requested review of this revision.Jun 1 2021, 3:56 AM
thakis updated this revision to Diff 348946.Jun 1 2021, 5:25 AM

fix archive files

int3 accepted this revision.Jun 1 2021, 11:22 AM
int3 added inline comments.
lld/MachO/DriverUtils.cpp
266–267

nit: how about zeroModTime? It's true that modTime is only being used by the debug info, but we're changing how it's (not) being read as well, so it's a bit of a misnomer. Plus the name is pretty long :p

lld/test/MachO/stabs.s
67

if you changed this to a numeric substitution (like the line immediately below) you could specify a shorter -D#TEST_TIME=0 on the command line

This revision is now accepted and ready to land.Jun 1 2021, 11:22 AM
thakis marked 2 inline comments as done.Jun 1 2021, 12:28 PM

Thanks!

Herald added a project: Restricted Project. · View Herald TranscriptJun 1 2021, 12:30 PM