It seems like the bitcode object that contains the declaration doesn't know the correct type and is calling it a function:
test_wasm_global_dylink (test_core.lto0.test_wasm_global_dylink) ... wasm-ld: error: symbol type mismatch: my_global
>>> defined as WASM_SYMBOL_TYPE_FUNCTION in /tmp/emscripten_temp_40r12q15/test_wasm_global.o
>>> defined as WASM_SYMBOL_TYPE_GLOBAL in test_wasm_global.wasm.lto.o