This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Add new -reproducible flag
ClosedPublic

Authored by keith on Apr 5 2023, 2:47 PM.

Details

Reviewers
int3
Group Reviewers
Restricted Project
Commits
rG1167d676100f: [lld-macho] Add new -reproducible flag
Summary

As of Xcode 14.3 it passes -reproducible by default to ld64. It seems
this flag was added in ld64 with Xcode 14.0, but it is not documented.
Through my testing the only thing I have seen it do is the same as
ZERO_AR_DATE, but it's possible it does more, or will do more in the
future. Since we already default to this option, this is more about
handling the command line flag to maintain Xcode compatibility than
anything else.

Diff Detail

Event Timeline

keith created this revision.Apr 5 2023, 2:47 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 5 2023, 2:47 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
keith requested review of this revision.Apr 5 2023, 2:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 5 2023, 2:47 PM
int3 accepted this revision.Apr 5 2023, 6:43 PM
int3 added a subscriber: int3.

Thanks!

lld/MachO/Options.td
674

try to avoid run-on sentences

lld/test/MachO/stabs.s
45–46

if ZERO_AR_DATE=1 and -reproducible is set, what does ld64 do?

This revision is now accepted and ready to land.Apr 5 2023, 6:43 PM
int3 added inline comments.Apr 5 2023, 6:45 PM
lld/test/MachO/stabs.s
45–46

nvm I got confused about which value of ZERO_AR_DATE would give us a reproducible binary. Ignore the previous comment :)

This revision was automatically updated to reflect the committed changes.
keith marked 2 inline comments as done.