Tool architecture vs build-time architeture vs run-time architecture

Jorn Vernee jorn.vernee at oracle.com
Mon Sep 5 13:08:43 UTC 2022


Hi,

Jextract uses clang underneath, which uses the platform jextract is run 
on as the target platform as well. i.e. options (2).

So, e.g., if I run jextract on Windows x64, I get Java bindings for 
Windows x64.

(Clang also has some cross-compilation capabilities, using -target, but 
currently that is not exposed. It probably would require more work to 
get fully functional as well)

Jorn

On 22/08/2022 12:39, Manuel Bleichenbacher wrote:
> I'm migrating this detail question over from the panama-dev mailing 
> list: can jextract built for macOS on Intel run on macOS for ARM 
> generate correct code for macOS on ARM?
>
> Note that the architecture (Intel vs ARM) affects three separate things:
>
>  1. jextract (the JVM and jextract are built for a certain platform
>     and architecture)
>  2. the architecture where jextract is run (macOS can run Intel code
>     on ARM)
>  3. the architecture of the resulting / the architecture where the
>     generated code will be run
>
> I understand that separate code is needed for different platforms and 
> architectures. So typically you would run jextract on each platform 
> separately. But what decides if jextract generates code for ARM or 
> Intel? Is it (1) the jextract variant or is it (2) the operating 
> system it is run on? Or does it even generate an unusable result if 
> (1) and (2) are different?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jextract-dev/attachments/20220905/37b3c709/attachment.htm>


More information about the jextract-dev mailing list