<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p>Hi,</p>
    <p>Jextract uses clang underneath, which uses the platform jextract
      is run on as the target platform as well. i.e. options (2).<br>
    </p>
    <p>So, e.g., if I run jextract on Windows x64, I get Java bindings
      for Windows x64.</p>
    <p>(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)<br>
    </p>
    <p>Jorn<br>
    </p>
    <div class="moz-cite-prefix">On 22/08/2022 12:39, Manuel
      Bleichenbacher wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:CAA7F5j+5pyUu80TBJnh+ukUa0Pwwk7sf+buG+1yD=jeYu7i1OA@mail.gmail.com">
      
      <div dir="ltr">
        <div>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?</div>
        <div><br>
        </div>
        <div>Note that the architecture (Intel vs ARM) affects three
          separate things:</div>
        <div>
          <ol>
            <li>jextract (the JVM and jextract are built for a certain
              platform and architecture)</li>
            <li>the architecture where jextract is run (macOS can run
              Intel code on ARM)</li>
            <li>the architecture of the resulting / the architecture
              where the generated code will be run</li>
          </ol>
          <div>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?<br>
          </div>
        </div>
      </div>
    </blockquote>
  </body>
</html>