wasm: Only generate import when referenced

Rather than creating an import for externs on updateDecl, we now
generate them when they're referenced. This is required so using @TypeOf(extern_fn())
will not emit the import into the binary (causing an incorrect function type index
as it won't be fully analyzed).
97448e4d5fLuuk de Gram committed on 3/26/2022, 8:20:29 PMparentaf84493
2 files changedLine totals unavailable