[lld][WebAssemlby] Improve support for -L / -l and add testing
authorSam Clegg <sbc@chromium.org>
Mon, 3 Oct 2022 15:31:23 +0000 (08:31 -0700)
committerSam Clegg <sbc@chromium.org>
Mon, 3 Oct 2022 23:53:30 +0000 (16:53 -0700)
commit0a9756fc15c57dc94146e65d251d7a3d941ae78a
tree4d56152193b601b46c3cb51fe57fe6fdcd18d8f8
parentd67def8704a08a936b458d73c65cfb7f5ebf5286
[lld][WebAssemlby] Improve support for -L / -l and add testing

- 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.

Differential Revision: https://reviews.llvm.org/D135087
lld/test/wasm/Inputs/libsearch-dyn.s [new file with mode: 0644]
lld/test/wasm/Inputs/libsearch-st.s [new file with mode: 0644]
lld/test/wasm/Inputs/use-bar.s [new file with mode: 0644]
lld/test/wasm/libsearch.s [new file with mode: 0644]
lld/wasm/Config.h
lld/wasm/Driver.cpp
lld/wasm/Options.td