Closed
Description
Similar to issue #2713, we would like to mature towards having Emscripten linker behave conformant to how native linkers work. The native linkers fail with an error if linking to an executable results in any undefined symbols that were not found. Currently by default, Emscripten will only issue a warning, but still continue and return with a success and error code of 0.
We should instead behave like native linkers do, and by default raise an error if the link step finishes with undefined symbols. This error should be presented with a helpful error message that instructs how the developer can acknowledge that the symbols are expected to be missing (e.g. "Pass the linker flag -s ERROR_UNDEFINED_SYMBOLS=0 to hide this warning").