This is an archive of the discontinued LLVM Phabricator instance.

[gn build] Fix link with ld.bfd and gold.
ClosedPublic

Authored by deepinthebuild on Jun 2 2020, 2:42 PM.

Details

Summary

lld's symbol resolution algorithm makes it not depend on
the order of object files and libraries, but ld.bfd and
gold require listing dependencies later on the link line.
Put {{libs}} after {{inputs}} so that e.g. -lpthreads
appears after the object files, not before it.

https://reviews.llvm.org/differential/diff/267997/

Diff Detail

Event Timeline

deepinthebuild created this revision.Jun 2 2020, 2:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 2 2020, 2:42 PM
This revision is now accepted and ready to land.Jun 2 2020, 3:43 PM
This revision was automatically updated to reflect the committed changes.