enable windows/arm64 go build with bazel#3072
Conversation
899d90d to
3f56d2e
Compare
|
@linzhp Can you help with review please ? |
| goos, goarch = "windows", "amd64" | ||
| if _get_env_var(ctx, "PROCESSOR_ARCHITECTURE") == "ARM64": | ||
| goarch = "arm64" | ||
| elif _get_env_var(ctx, "PROCESSOR_ARCHITEW6432") == "ARM64": | ||
| goarch = "arm64" |
There was a problem hiding this comment.
Can you try ctx.os.arch?
| goos, goarch = "windows", "amd64" | |
| if _get_env_var(ctx, "PROCESSOR_ARCHITECTURE") == "ARM64": | |
| goarch = "arm64" | |
| elif _get_env_var(ctx, "PROCESSOR_ARCHITEW6432") == "ARM64": | |
| goarch = "arm64" | |
| goos = "windows" | |
| if ctx.os.arch == "<some archecture>": | |
| goarch = "arm64" | |
| else: | |
| goarch = "amd64" |
There was a problem hiding this comment.
Much better! Seems to work
|
@linzhp Unfortunately, one test is failing on CI now with the latest change. Any guess? |
|
Yeah, |
Thanks. Shall I revert latest commit and use previous approach of using environment variables ? |
|
You can decide which way you want to go |
This reverts commit 92d0012.
Ok I will use env. variable for the time being. |
|
I am hoping to get #3083 in so next release will be for Go 1.18 support. |
What type of PR is this?
What does this PR do? Why is it needed?
Other notes for review
Go for windows/arm64 is available from version 17. This patch adds the missing pieces to build go programs with bazel.