add -nobounds (similar to -gcflags=-B)

This commit is contained in:
Damian Gryski
2025-04-14 17:01:03 -07:00
committed by Ron Evans
parent 133e32c1c4
commit 0fdf08d14f
5 changed files with 9 additions and 0 deletions
+1
View File
@@ -58,6 +58,7 @@ type Config struct {
MaxStackAlloc uint64
NeedsStackObjects bool
Debug bool // Whether to emit debug information in the LLVM module.
Nobounds bool // Whether to skip bounds checks
PanicStrategy string
}
+4
View File
@@ -438,6 +438,10 @@ func (c *compilerContext) parsePragmas(info *functionInfo, f *ssa.Function) {
}
}
}
if c.Nobounds {
info.nobounds = true
}
}
// Check whether this function can be used in //go:wasmimport or