This adds a --emscripten command-line option to lld, for use by Emscripten.
Issue an error if -shared or -export-dynamic are used without --emscripten, as the current infrastructure for dynamic linking is specific to Emscripten. We've had reports of users attempting to use these options outside of Emscripten, so it's desirable to diagnose this.
And, don't default to exporting heap_base or data_end without --emscripten. Exporting these exposes implementation details. Embeddings which need them exported can use -Wl,--export=__heap_base and -Wl,--export=__data_end as needed to request this explicitly. With this change, statically-linked WASI executables only export "memory" and "_start".
The `__attribute__((used))` behaviour is depend on the compiler time triple isn't it ? Not the linker flag?