HomePhabricator

[lld][WebAssembly] Honor --allow-undefined for data symbols too

Authored by sbc100 on May 1 2020, 10:00 AM.

Description

[lld][WebAssembly] Honor --allow-undefined for data symbols too

This was originally the way this worked before before
https://reviews.llvm.org/D60882.

In retrospect it seems inconsistent that --allow-undefined doesn't
work for all symbols. See:
https://groups.google.com/g/emscripten-discuss/c/HSRgQiIq1gI/m/Kt9oFWHiAwAJ

I'm also planning a followup change which implement the full
--unresolved-symbols=.. flags supported by ELF linkers (both ld and
ld.lld) since it seems more standard.

Differential Revision: https://reviews.llvm.org/D79247