Compile zipalign.exe as 64-bit

326 views
Skip to first unread message

John

unread,
Jun 28, 2023, 2:53:05 PM6/28/23
to Android Building
I manage to compile zipalign on Linux and it outputs as linux-x86 and windows-x86. The question is how do I compile as 64-bit? I need 64-bit of zipalign.exe to avoid 32-bit limitation

Fabien Sanglard

unread,
Jun 28, 2023, 3:09:10 PM6/28/23
to android-...@googlegroups.com
What do you mean by "32-bit limitation". Are you talking about zip64 file format?

On Wed, Jun 28, 2023 at 11:53 AM John <quocdu...@gmail.com> wrote:
I manage to compile zipalign on Linux and it outputs as linux-x86 and windows-x86. The question is how do I compile as 64-bit? I need 64-bit of zipalign.exe to avoid 32-bit limitation

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/9afd65cc-c829-4adf-a81c-9030b7d8677en%40googlegroups.com.

enh

unread,
Jun 28, 2023, 3:25:38 PM6/28/23
to android-...@googlegroups.com
i suspect they mean "i want https://android-review.googlesource.com/c/platform/build/+/2380864", the commit message for which mentions that there's no 64-bit Windows build support (but you shouldn't need it either --- the OS doesn't support zip64, so there'd be little use in being able to generate/modify zip64 files :-) ).

Dan Willemsen

unread,
Jun 28, 2023, 3:51:32 PM6/28/23
to android-...@googlegroups.com
There is build system support for 64-bit windows binaries, but it's not very well tested. A change like https://android-review.git.corp.google.com/c/platform/build/+/2645079 will produce a 64-bit zipalign.exe.

enh

unread,
Jun 28, 2023, 4:02:06 PM6/28/23
to android-...@googlegroups.com
but see the commit message for my zipalign fix, which points out that switching to a 64-bit windows build doesn't help with this bug anyway.

(this also means that windows64 is a wholly untested _variant_ of 64-bitness --- my fear is that windows32 is safer because at least windows32 is similar to 32-bit linux, whereas windows64 went with LLP64 rather than unix's LP64. which is why a 64-bit build doesn't fix zipalign in the same way it did for the unixes. at _some_ point our general 32-bit support will have bitrotted to the extent that it might be worth taking your chances with windows64, but that's probably closer to 2030.)

enh

unread,
Jun 29, 2023, 11:44:32 AM6/29/23
to android-...@googlegroups.com
i wonder how many windows binaries we have in total... and what subset of them might actually benefit from being x86-64? might adb run faster with more registers? probably not? would aapt2? does anything else even have runtimes long enough that anyone *could* notice?

(the toolchain has been 64-bit for years, so nothing to be gained there.)
Reply all
Reply to author
Forward
0 new messages