This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Make `--icf=safe` work with LTO
ClosedPublic

Authored by int3 on Jun 12 2022, 7:31 AM.

Details

Reviewers
thakis
Group Reviewers
Restricted Project
Commits
rGd378268ead93: [lld-macho] Make `--icf=safe` work with LTO
Summary

Just matter of enabling the config option.

(Also changed the platform of the input test file to macOS, since that's
the default that we specify in the %lld substitution. The conflict was
causing errors when linking with LTO.)

Diff Detail

Event Timeline

int3 created this revision.Jun 12 2022, 7:31 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 12 2022, 7:31 AM
int3 requested review of this revision.Jun 12 2022, 7:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 12 2022, 7:31 AM
int3 added a subscriber: alexbdv.Jun 12 2022, 7:31 AM
int3 added inline comments.
lld/test/MachO/icf-safe.ll
5

question for @alexbdv: why the use of -O3 and -enable-machine-outliner=never here?

thakis accepted this revision.Jun 12 2022, 10:10 AM
This revision is now accepted and ready to land.Jun 12 2022, 10:10 AM
This revision was automatically updated to reflect the committed changes.