RFR: 8370659: [mobile] enable static-libs-image for Android [v2]

Julian Waters jwaters at openjdk.org
Mon Jan 5 11:59:26 UTC 2026


On Mon, 5 Jan 2026 11:06:40 GMT, Johan Vos <jvos at openjdk.org> wrote:

>> make/autoconf/flags-cflags.m4 line 73:
>> 
>>> 71: 
>>> 72:   # Debug symbols
>>> 73:   if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$OPENJDK_TARGET_OS" = xandroid; then
>> 
>> What gcc flags does Android need that can't be done in the clang block?
>
> @TheShermanTanker That's an excellent question, and I'm not happy with my answer. Unless I'm missing something, unfortunately there is no way to use different debug flags when building for target versus for build system. When compiling for target Android on a Linux host, the same set of flags are used. We use different compilers though: clang for the Android code for code that eventually will run on Android, and c for the tools that will run on the build system.
> The check in flags-cflags.m4 checks for the toolchain, but the flags are also applied for code that needs to be built and executed on the build system.

I see. I'll investigate more into that to see if I can help upstream when I can.

-------------

PR Review Comment: https://git.openjdk.org/mobile/pull/40#discussion_r2661249998


More information about the mobile-dev mailing list