-
- Downloads
cmd: move GOEXPERIMENT knob from make.bash to cmd/go
This CL changes GOEXPERIMENT to act like other GO[CONFIG] environment variables. Namely, that it can be set at make.bash time to provide a default value used by the toolchain, but then can be manually set when running either cmd/go or the individual tools (compiler, assembler, linker). For example, it's now possible to test rsc.io/tmp/fieldtrack by simply running: GOEXPERIMENT=fieldtrack go test -gcflags=-l rsc.io/tmp/fieldtrack \ -ldflags=-k=rsc.io/tmp/fieldtrack.tracked without needing to re-run make.bash. (-gcflags=-l is needed because the compiler's inlining abilities have improved, so calling a function with a for loop is no longer sufficient to suppress inlining.) Fixes #42681. Change-Id: I2cf8995d5d0d05f6785a2ee1d3b54b2cfb3331ca Reviewed-on: https://go-review.googlesource.com/c/go/+/300991 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by:Bryan C. Mills <bcmills@google.com>
Showing
- src/cmd/asm/internal/lex/input.go 10 additions, 0 deletionssrc/cmd/asm/internal/lex/input.go
- src/cmd/dist/build.go 4 additions, 12 deletionssrc/cmd/dist/build.go
- src/cmd/dist/buildruntime.go 2 additions, 4 deletionssrc/cmd/dist/buildruntime.go
- src/cmd/go/internal/cfg/cfg.go 7 additions, 6 deletionssrc/cmd/go/internal/cfg/cfg.go
- src/cmd/go/internal/work/exec.go 8 additions, 0 deletionssrc/cmd/go/internal/work/exec.go
- src/cmd/go/internal/work/gc.go 0 additions, 12 deletionssrc/cmd/go/internal/work/gc.go
- src/cmd/internal/objabi/util.go 13 additions, 12 deletionssrc/cmd/internal/objabi/util.go
- src/cmd/link/internal/ld/main.go 2 additions, 0 deletionssrc/cmd/link/internal/ld/main.go
- src/internal/cfg/cfg.go 1 addition, 0 deletionssrc/internal/cfg/cfg.go
- src/runtime/heapdump.go 1 addition, 1 deletionsrc/runtime/heapdump.go
- src/runtime/internal/sys/arch.go 2 additions, 0 deletionssrc/runtime/internal/sys/arch.go
- src/runtime/proc.go 1 addition, 1 deletionsrc/runtime/proc.go
Loading
Please register or sign in to comment