RFR: 8357119: Make Zero the default and only variant of HotSpot for iOS [v2]

Johan Vos jvos at openjdk.org
Fri May 16 17:09:02 UTC 2025


On Fri, 16 May 2025 13:03:13 GMT, Johan Vos <jvos at openjdk.org> wrote:

>> Julian Waters has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Touch up README.md
>
> @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)

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

PR Comment: https://git.openjdk.org/mobile/pull/35#issuecomment-2887262049


More information about the mobile-dev mailing list