cmd/go: subprocess (linker, cgo command) does not use the value of GOTMPDIR variable #59636
Labels
GoCommand
cmd/go
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?1.20.3.
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?Windows 10,
Intel x86-64.
What did you do?
My environment variable
GOTMPDIR
is set to a custom place.When I am trying to build something I look at the compiler's output using the
-x
argument.It looks like, the compiler is using the
GOTMPDIR
at the frist stage of executable file building, at the compile stage, but at the second stage it uses the default system path instead of theGOTMPDIR
variable.What did you expect to see?
I expect to use the
GOTMPDIR
variable value for all build stages in Go.What did you see instead?
It looks like, the compiler is using the
GOTMPDIR
at the frist stage of executable file building, at the compile stage, but at the second stage it uses the default system path instead of theGOTMPDIR
variable.Here we can see that path in first stage is:
But in the linking stage it is suddenly changed to the default path:
The text was updated successfully, but these errors were encountered: