RFR: 8357119: Make Zero the default and only variant of HotSpot for iOS [v2]
Johan Vos
jvos at openjdk.org
Sun May 18 17:56:12 UTC 2025
On Fri, 16 May 2025 17:05:50 GMT, Johan Vos <jvos at openjdk.org> wrote:
>> @TheShermanTanker thank you for the PR. Looks good, some minor comments.
>> The biggest minor comment is probably about restricting the VM variant to Zero for all iOS builds. I believe there is value in building the server variant for the iOS simulator. While you can't distribute apps with it, it might help developers testing their apps quickly.
>
>> @johanvos How can you test if you are building for the device or an emulator?
>>
>> If this can/should be supported, then we also need to write something about it in the documents, not only update configure.
>>
>> And if we can't detect the difference, then maybe most of this PR will need to be scrapped.
>
> That is defined in the sysroot that is passed with configure. If you provide
> `--with-sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk` you are building for the device.
>
> If you provide
> `--with-sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/`
> you are building the the simulator.
>
> If the latter SDK is selected, `#ifdef TARGET_OS_SIMULATOR` will return true when compiling code. (but that won't help for the makefiles to detect if we're building for device or simulator)
> > @johanvos How can you test if you are building for the device or an emulator?
> > If this can/should be supported, then we also need to write something about it in the documents, not only update configure.
> > And if we can't detect the difference, then maybe most of this PR will need to be scrapped.
>
> I still think defaulting to Zero for iOS is helpful, but I can remove the restricting of valid iOS JVM variants to only Zero since that is problematic.
Defaulting to Zero for iOS sounds like a good idea indeed.
-------------
PR Comment: https://git.openjdk.org/mobile/pull/35#issuecomment-2889123825
More information about the mobile-dev
mailing list