Skip to content

Commit b56b379

Browse files
hajimehoshigopherbot
authored andcommitted
cmd/gomobile: update comments to explain why x86_64 is used for Arm64
Android NDK provides universal binaries both for Intel and Arm architectures without changing the path from r24. Thus, we should keep using x86_64 as a part of path. This change updates the comment to explain the situation. Change-Id: I1368745f5d7d2b018fb88a0cc83e27846402bbd9 Reviewed-on: https://go-review.googlesource.com/c/mobile/+/746140 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Mark Freeman <markfreeman@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
1 parent dcd2a32 commit b56b379

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

cmd/gomobile/env.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -528,9 +528,13 @@ func archNDK() string {
528528
case "amd64":
529529
arch = "x86_64"
530530
case "arm64":
531-
// Android NDK does not contain arm64 toolchains (until and
532-
// including NDK 23), use use x86_64 instead. See:
533-
// https://github.com/android/ndk/issues/1299
531+
// Until NDK 23, Android NDK does not contain Arm64 toolchains.
532+
// From NDK 24, Android NDK supports Arm64 as universal binaries without changing the path.
533+
// Use "x86_64" as a part of the path.
534+
// See also:
535+
// * https://developer.android.com/ndk/guides/other_build_systems
536+
// * https://github.com/android/ndk/wiki/Changelog-r24
537+
// * https://github.com/android/ndk/issues/1299
534538
if runtime.GOOS == "darwin" {
535539
arch = "x86_64"
536540
break

0 commit comments

Comments
 (0)