-
Notifications
You must be signed in to change notification settings - Fork 17.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go: not print not-defaults arch-env when set not-defaults arch-env bootstrap or not set not-defaults arch-env bootstrap #67492
Comments
Fixes golang#67492 For golang#34208 Change-Id: I33a029f307d4a199dc338387cde41d49764f8fd7
Change https://go.dev/cl/586241 mentions this issue: |
I think the current behavior might be correct? When you run make.bat with GOAMD64=v3 you're essentially setting the default value for your go build to be v3. Then when you run env -changed, the default value is the same as the value in the environment so there should be no diff printed. |
But I use
still won't print set GOAMD64=v3 |
For now, all arch-env , call EnvOrAndChanged the second parameter set now appears to be wrong, and its value is the relevant environment variable. (This means that there will be no non-default values because go will not get different values in internal/buildcfg and cmd/go/internal/cfg for the same environment variable such as GOAMD64.) |
See https://go.dev/wiki/MinimumRequirements#amd64 , GOAMD64 default value is v1, set GOAMD64=v3 happen default value is v3 Nonconformity documentation. |
Ultimately I think someone more familiar with dist and the GO microarchitecture variables should make the decision. But from my perspective the the "default" behavior is what happens when you don't change the environment. Also we shouldn't be changing anything outside of the go command. The behavior in
not printing set GOAMD64=v3 does seem incorrect. but we should be able to detect that without changing dist or the runtime |
Default values for GOARM were not fixed. Since its default value is obtained in cmd/dist.xgetgoarm, Dependent variable Settings are too complicated, Copying is difficult to guarantee semantic equivalence. For golang#67492 Change-Id: Ib8c7ed52fcc4bfae39577cb851e306180a6ab1c3
Most arch-env can, PR fix has been sent. |
Change https://go.dev/cl/587177 mentions this issue: |
Go version
go version devel go1.23-38d8d01d3f Sat May 18 09:38:57 2024 +0800 windows/amd64
Output of
go env
in your module/workspace:What did you do?
set GOAMD64=v3
./make.bat
..\bin\go env -changed
What did you see happen?
not print set GOAMD64=v3
What did you expect to see?
print set GOAMD64=v3
The text was updated successfully, but these errors were encountered: