Finschia / cosmwasm

Fast and reusable WebAssembly smart contract runtime(and library) for finschia-sdk.
Apache License 2.0
27 stars 14 forks source link

fix: limit exporting GlobalEnv only to wasm32 target #212

Closed loloicci closed 2 years ago

loloicci commented 2 years ago

Description

This PR limits exporting GlobalEnv only to wasm32 target. Without this, the following error is caused during wasmvm's test for alpine linux.

# github.com/line/wasmvm/api
/usr/lib/gcc/x86_64-alpine-linux-musl/9.3.0/../../../../x86_64-alpine-linux-musl/bin/ld: api/libwasmvm_static.a(cosmwasm_std-bab964781d528372.cosmwasm_std.c8z0klf1-cgu.10.rcgu.o): in function `cosmwasm_std::global_api::GlobalApi::env':
cosmwasm_std.c8z0klf1-cgu.10:(.text._ZN12cosmwasm_std10global_api9GlobalApi3env17h764e247a0bf6c1faE+0x13): undefined reference to `global_env'
collect2: error: ld returned 1 exit status
make[1]: *** [release-build-alpine] Error 2
make: *** [release-build] Error 2

Types of changes

Checklist