Skip to content

Commit 4d21dbb

Browse files
koct9ionsi
authored andcommitted
Add asan CLI option mirroring msan implementation
Address sanitizer was introduced in Go 1.18 Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com>
1 parent c102161 commit 4d21dbb

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

types/config.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ type GoFlagsConfig struct {
215215
N bool
216216
ModFile string
217217
ModCacheRW bool
218+
ASan bool
218219
MSan bool
219220
PkgDir string
220221
Tags string
@@ -570,6 +571,8 @@ var GoBuildFlags = GinkgoFlags{
570571
Usage: "leave newly-created directories in the module cache read-write instead of making them read-only."},
571572
{KeyPath: "Go.ModFile", Name: "modfile", UsageArgument: "file", SectionKey: "go-build",
572573
Usage: `in module aware mode, read (and possibly write) an alternate go.mod file instead of the one in the module root directory. A file named go.mod must still be present in order to determine the module root directory, but it is not accessed. When -modfile is specified, an alternate go.sum file is also used: its path is derived from the -modfile flag by trimming the ".mod" extension and appending ".sum".`},
574+
{KeyPath: "Go.ASan", Name: "asan", SectionKey: "go-build",
575+
Usage: "enable interoperation with address sanitizer."},
573576
{KeyPath: "Go.MSan", Name: "msan", SectionKey: "go-build",
574577
Usage: "enable interoperation with memory sanitizer. Supported only on linux/amd64, linux/arm64 and only with Clang/LLVM as the host C compiler. On linux/arm64, pie build mode will be used."},
575578
{KeyPath: "Go.N", Name: "n", SectionKey: "go-build",

0 commit comments

Comments
 (0)