This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Improve legibility of ld -z options on Solaris
ClosedPublic

Authored by ro on Aug 27 2023, 10:26 AM.

Details

Summary

Following the lead of the Linux code, this patch passes the ld -z options as two separate args on Solaris, improving legibility. For lack of a variadic std::push_back, getAsNeededOption had to be changed to addAsNeededOption, matching other add*Options functions, changing callers accordingly. The additional args are also used in a WIP revision of the Solaris GNU ld patch D85309, which will allow runtime selection of the linker to use.

Tested on amd64-pc-solaris2.11 and x86_64-pc-linux-gnu.

Diff Detail

Event Timeline

ro created this revision.Aug 27 2023, 10:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 27 2023, 10:26 AM
ro requested review of this revision.Aug 27 2023, 10:26 AM
MaskRay accepted this revision.Aug 27 2023, 10:04 PM

LGTM.

This revision is now accepted and ready to land.Aug 27 2023, 10:04 PM
This revision was landed with ongoing or failed builds.Aug 28 2023, 12:26 AM
This revision was automatically updated to reflect the committed changes.