builder: add strlen to wasm builtins

LLVM 22 can replace string-scanning loops with calls to strlen during
optimization. Add the implementation to wasmbuiltins and invalidate
cached archives.

Add an optimized wasm-unknown smoke test that exercises the reflect
name-decoding path which exposed the missing symbol.
This commit is contained in:
Jake Bailey
2026-08-29 23:45:30 -07:00
committed by Ron Evans
parent 61c315cbfb
commit fc0673430d
4 changed files with 24 additions and 7 deletions
+15
View File
@@ -0,0 +1,15 @@
package main
import "reflect"
type value struct {
Field int
}
//go:wasmexport typeNameLength
func typeNameLength() uint32 {
return uint32(len(reflect.TypeOf(value{}).String()))
}
func main() {
}