When compiling C(++) code that has extern function declarations to WebAssembly with Clang, it gives undefined reference errors rather than importing the symbol. What option will make the linker add those as imports to the WebAssembly module instead of trying to resolve them?
#ifdef __cplusplus
extern "C" {
#endif
extern void externalFunction(void);
#ifdef __cplusplus
}
#endif
int main() {
externalFunction();
return 0;
}