mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 13:33:39 +00:00
wasm: remove -wasm-abi= flag
This flag controls whether to convert external i64 parameters for use in a browser-like environment. This flag was needed in the past because back then we only supported wasm on browsers but no WASI. Now, I can't think of a reason why anybody would want to change the default. For `-target=wasm` (used for browser-like environments), the wasm_exec.js file expects this i64-via-stack ABI. For WASI, there is no limitation on i64 values and `-wasm-abi=generic` is the default.
This commit is contained in:
committed by
Ron Evans
parent
8906584fb9
commit
268140ae40
@@ -1077,7 +1077,6 @@ func optimizeProgram(mod llvm.Module, config *compileopts.Config) error {
|
||||
// cannot be represented exactly in JavaScript (JS only has doubles). To
|
||||
// keep functions interoperable, pass int64 types as pointers to
|
||||
// stack-allocated values.
|
||||
// Use -wasm-abi=generic to disable this behaviour.
|
||||
if config.WasmAbi() == "js" {
|
||||
err := transform.ExternalInt64AsPtr(mod, config)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user