cmd/gomobile: allow arm64 host toolchain on Android (Termux)#115
cmd/gomobile: allow arm64 host toolchain on Android (Termux)#115fann22 wants to merge 1 commit intogolang:masterfrom
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
This PR (HEAD: 52a5fcb) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/mobile/+/727260. Important tips:
|
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/727260. |
|
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be Please don’t reply on this GitHub thread. Visit golang.org/cl/727260. |
|
Message from Hajime Hoshi: Patch Set 1: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/727260. |
|
Message from Hajime Hoshi: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/727260. |
cmd/gomobile: improve Android/arm64 host compatibility
Gomobile historically assumes that an arm64 host cannot provide an
arm64 NDK toolchain (due to official NDK limitations up to r23), and
therefore treats GOARCH=arm64 as unsupported. This causes gomobile
to fail immediately when run in Android/arm64 environments such as
Termux, even when a working arm64 host toolchain is available.
This change adds a minimal check to allow gomobile to use arm64 host
toolchains when GOOS=android and a Termux-style environment is
detected. The existing behavior for all other platforms remains
unchanged.
In addition, gomobile no longer overrides CC/CXX if the caller has
already provided them, allowing custom toolchains to be used safely.
This enables gomobile bind and gomobile build to run successfully
under Termux without affecting desktop builds.