-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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/cgo: AR environment variable not used with buildmode=c-archive #68362
Comments
The Go tools don't look at the AR environment variable. Maybe they should. You can do what you want using |
Does it look at |
Yes, that is how it works today. Which does seem odd. I think it happened because gccgo has needed to run |
At tip, specifically after CL 592375, the linker now uses |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
Go version
go version go1.22.4 windows/amd64
Output of
go env
in your module/workspace:What did you do?
test code
cross-tools
build command
$ CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ AR=aarch64-linux-gnu-ar CGO_ENABLED=1 GOOS=linux GOARCH=arm64 GOARM=7 go build -ldflags "-s -w" -buildmode=c-archive -o test.a test.go
What did you see happen?
What did you expect to see?
The go build command should successfully use the aarch64-linux-gnu-ar tool as specified by the AR environment variable.
The text was updated successfully, but these errors were encountered: