mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-09 13:33:39 +00:00
compiler, runtime: enable go:wasmexport for wasip2 (#4499)
* compiler: prefer go:wasmexport over go:export * runtime, targets/wasip2: enable -buildmode=c-shared for wasip2 * runtime: rename import from wasi_run to wasiclirun (PR feedback)
This commit is contained in:
@@ -389,6 +389,13 @@ func (c *compilerContext) parsePragmas(info *functionInfo, f *ssa.Function) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If both //go:wasmexport and //go:export or //export are declared,
|
||||
// only honor go:wasmexport.
|
||||
if info.wasmExport != "" {
|
||||
// TODO: log warning?
|
||||
info.exported = false
|
||||
}
|
||||
}
|
||||
|
||||
// Check whether this function can be used in //go:wasmimport or
|
||||
|
||||
Reference in New Issue
Block a user