This is an archive of the discontinued LLVM Phabricator instance.

[clang/mac] Accept -why_load and make -whyload an alias for it
ClosedPublic

Authored by thakis on Mar 7 2021, 2:00 PM.

Details

Summary

From man ld:

-why_load   Log why each object file in a static library is loaded.
            That is, what symbol was needed.
            Also called -whyload for compatibility.

So -why_load is the spelling preferred by the linker and -whyload and old
compatibility setting. clang should accept the preferred form, and map both
forms to the preferred form.

Diff Detail

Event Timeline

thakis created this revision.Mar 7 2021, 2:00 PM
thakis requested review of this revision.Mar 7 2021, 2:00 PM
hans accepted this revision.Mar 8 2021, 1:04 AM

lgtm

nit in the change description

So -why_load is the spelling preferred by the linker and -whyload and old

second "and" -> "an"

This revision is now accepted and ready to land.Mar 8 2021, 1:04 AM
This revision was landed with ongoing or failed builds.Mar 8 2021, 6:11 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 8 2021, 6:11 AM