add wasm-abi field in TargetSpec && set generic for WASI by default (#1421)

Signed-off-by: mathetake <takeshi@tetrate.io>
This commit is contained in:
Takeshi Yoneda
2020-10-04 02:52:01 +09:00
committed by GitHub
parent 9ad2315079
commit 9a015f4f64
7 changed files with 17 additions and 9 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ func Build(pkgName, outpath string, config *compileopts.Config, action func(Buil
// keep functions interoperable, pass int64 types as pointers to
// stack-allocated values.
// Use -wasm-abi=generic to disable this behaviour.
if config.Options.WasmAbi == "js" && strings.HasPrefix(config.Triple(), "wasm") {
if config.WasmAbi() == "js" {
err := transform.ExternalInt64AsPtr(mod)
if err != nil {
return err