]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: add -env key=value flag
authorRuss Cox <rsc@golang.org>
Wed, 5 Jul 2023 19:11:41 +0000 (15:11 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 10 Aug 2023 15:53:49 +0000 (15:53 +0000)
commitc14655da986e6c43268ad3edec1cf984a763694f
treef97b63b0ff99de83c52981e2d2d96bc8c722a9f4
parente34de96d588b93c3c4ee8c6a11f99a8f8f3390a6
cmd/compile: add -env key=value flag

This flag is not terribly useful with the go command, which will pass
all environment variables through to subprocesses it invokes,
but it can be useful in other build systems, notably blaze and bazel,
to pass compiler-debugging variables like GOSSAFUNC through to
the compiler.

We have been maintaining this as a patch against Google's internal
toolchain for many years, and it has proven useful in those non-go-command
contexts.

Change-Id: Ic123193319f3c838a694eda2575347c516b85ac7
Reviewed-on: https://go-review.googlesource.com/c/go/+/507977
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
src/cmd/compile/internal/base/flag.go