diff options
Diffstat (limited to 'transform/wasm-abi.go')
-rw-r--r-- | transform/wasm-abi.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/transform/wasm-abi.go b/transform/wasm-abi.go index 0c3af9a3d..85e419145 100644 --- a/transform/wasm-abi.go +++ b/transform/wasm-abi.go @@ -73,6 +73,10 @@ func ExternalInt64AsPtr(mod llvm.Module) error { fn.SetName(name + "$i64wrap") externalFnType := llvm.FunctionType(returnType, paramTypes, fnType.IsFunctionVarArg()) externalFn := llvm.AddFunction(mod, name, externalFnType) + optsize := fn.GetEnumFunctionAttribute(llvm.AttributeKindID("optsize")) + if !optsize.IsNil() { + fn.AddFunctionAttr(optsize) + } if fn.IsDeclaration() { // Just a declaration: the definition doesn't exist on the Go side |