RFR: 8276174: Build failure on MacBook Air (M1) in JFX component graphics [v2]

Johan Vos jvos at openjdk.java.net
Fri Nov 19 14:10:45 UTC 2021


On Thu, 18 Nov 2021 17:02:19 GMT, Andreas Heger <duke at openjdk.java.net> wrote:

>> By changing the value for the clang -arch parameter to "arm64", the jfx project compiles on an apple silicon system. Are there any side effects which I might be missing in this simple solution?
>
> Andreas Heger has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8276174: Set default TARGET_ARCH to "arm64" on apple silicon machines

Approved with the comment that I don't think the TARGET_ARCH should be modified in a build script, but since this is the current setup, it is probably the most pragmatic approach.

I had a look how it is done in the JDK (flags.m4)

  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
    if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
      MACHINE_FLAG="$MACHINE_FLAG -arch arm64"

The TARGET_CPU is never changed, and the MACHINE_FLAG is the one being passed to the compiler. That looks cleaner to me. 
I would prefer to have a single value of TARGET_CPU that is the same for Linux/AArch64, macOS/AArch64 and win/AArch64, but since we already semantic overloading in build.gradle, I won't object the current change.

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

Marked as reviewed by jvos (Reviewer).

PR: https://git.openjdk.java.net/jfx/pull/666


More information about the openjfx-dev mailing list