This is an archive of the discontinued LLVM Phabricator instance.

[lld][WebAssemlby] Improve support for -L / -l and add testing
ClosedPublic

Authored by sbc100 on Oct 3 2022, 10:18 AM.

Details

Summary
  • Add support -Bdynamic/-Bstatic and their aliases
  • Add support for --library and --library-path long form args
  • Add test based on test/ELF/libsearch.s
  • In -Bdynamic mode search for .so files in preference to .a.
  • Unlike ELF continue to default to static mode until -pie or -shared are used.

Diff Detail

Event Timeline

sbc100 created this revision.Oct 3 2022, 10:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 3 2022, 10:18 AM
Herald added subscribers: pmatos, asb, wingo. · View Herald Transcript
sbc100 requested review of this revision.Oct 3 2022, 10:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 3 2022, 10:18 AM
dschuff added inline comments.Oct 3 2022, 11:58 AM
lld/test/wasm/libsearch.s
50

Should we default to static here?

sbc100 updated this revision to Diff 464842.Oct 3 2022, 3:36 PM

don't ever look for .so files when static linking

sbc100 updated this revision to Diff 464843.Oct 3 2022, 3:37 PM
  • add test
lld/test/wasm/libsearch.s
50

You are right.. fixed.

dschuff accepted this revision.Oct 3 2022, 4:49 PM
This revision is now accepted and ready to land.Oct 3 2022, 4:49 PM