This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Unset ExportDynamic where possible for LTO
ClosedPublic

Authored by int3 on Feb 9 2022, 1:14 PM.

Details

Reviewers
thakis
Group Reviewers
Restricted Project
Commits
rG103e1d934a35: [lld-macho] Unset ExportDynamic where possible for LTO
Summary

By unsetting this property, we are now able to internalize more symbols
during LTO. I compared the output of -save-temps for both LLD and
ld64, and we now match ld64's behavior as far as lto-internalize.ll is
concerned.

(Thanks @smeenai for working on an initial version of this diff!)

Fixes https://github.com/llvm/llvm-project/issues/50574.

Diff Detail

Event Timeline

int3 created this revision.Feb 9 2022, 1:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 9 2022, 1:14 PM
int3 requested review of this revision.Feb 9 2022, 1:14 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 9 2022, 1:14 PM
int3 updated this revision to Diff 407343.Feb 9 2022, 4:37 PM

remove old comment

int3 added inline comments.Feb 9 2022, 10:07 PM
lld/MachO/InputFiles.cpp
1561

oops, this line should be in a separate diff

ormris removed a subscriber: ormris.Feb 10 2022, 9:55 AM
ormris added a subscriber: ormris.
int3 edited the summary of this revision. (Show Details)Feb 11 2022, 6:10 PM
thakis accepted this revision.Feb 11 2022, 6:29 PM
thakis added a subscriber: thakis.

Makes sense, I think :)

This revision is now accepted and ready to land.Feb 11 2022, 6:29 PM
This revision was automatically updated to reflect the committed changes.