This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Implement -noall_load
ClosedPublic

Authored by keith on Jan 18 2022, 5:19 PM.

Details

Reviewers
oontvoo
Group Reviewers
Restricted Project
Commits
rG67090e3446e8: [lld-macho] Implement -noall_load
Summary

This flag is the default, so in ld64 it is not implemented, but it can
be useful to negate previous -all_load arguments. Specifically if your
build system has some global linker flags, that you may want to negate
for specific links. We use something like this today to make sure some
C++ symbols are automatically discovered for all links, which passing
-all_load hides.

Diff Detail

Event Timeline

keith created this revision.Jan 18 2022, 5:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 18 2022, 5:19 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Herald added a subscriber: dang. · View Herald Transcript
keith requested review of this revision.Jan 18 2022, 5:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 18 2022, 5:19 PM
oontvoo accepted this revision.Jan 18 2022, 7:22 PM
oontvoo added a subscriber: oontvoo.

LG thanks!

lld/test/MachO/archive.s
35

for completeness, can we have a test where -noall_load is used alone?

This revision is now accepted and ready to land.Jan 18 2022, 7:22 PM
keith updated this revision to Diff 401075.Jan 18 2022, 7:26 PM
keith marked an inline comment as done.

Add test case for only using -noall_load

This revision was automatically updated to reflect the committed changes.