This matches the behavior of the ELF linker where -u/--undefined
means symbols will get pulled in from archives but won't result
in link error if they are missing.
This results in nice simplification of the code too.
Paths
| Differential D50279
[WebAssembly] Don't error when --undefined symbols are not found ClosedPublic Authored by sbc100 on Aug 3 2018, 4:00 PM.
Details Summary This matches the behavior of the ELF linker where -u/--undefined This results in nice simplification of the code too.
Diff Detail
Event Timelinesbc100 retitled this revision from Don't error when --undefined symbols are not found to [WebAssembly] Don't error when --undefined symbols are not found. Comment Actions In ELF, we took a different approach. What we did in the lld/ELF driver is this:
I don't think there's particular reason to implement it in a different way, so could you do it that way? Herald added subscribers: dexonsmith, steven_wu, mehdi_amini. · View Herald TranscriptAug 3 2018, 4:40 PM Comment Actions Generally looking good.
This revision is now accepted and ready to land.Aug 3 2018, 4:54 PM Closed by commit rL338938: [WebAssembly] Don't error when --undefined symbols are not found (authored by sbc). · Explain WhyAug 3 2018, 5:04 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 159132 test/wasm/call-indirect.ll
test/wasm/cxx-mangling.ll
test/wasm/demangle.ll
test/wasm/export-all.ll
test/wasm/export.ll
test/wasm/load-undefined.test
test/wasm/lto/export.ll
test/wasm/undefined-entry.test
test/wasm/undefined.ll
test/wasm/visibility-hidden.ll
test/wasm/weak-alias-overide.ll
test/wasm/weak-undefined.ll
wasm/Driver.cpp
wasm/SymbolTable.cpp
|
Not sure if this has to be inside a guard for --relocatable. Any reason for that?