On Thu, 18 Nov 2021 17:02:19 GMT, Andreas Heger <d...@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 We also pass -PTARGET_ARCH=arm64 when invoking gradlew. We don't have specific flags that we pass to build webkit, so having the TARGET_ARCH set to arm64 in one way or another should be sufficient. I'm not sure about the best place for this. When this was done in OpenJDK, the arch-information would be supplied to `configure.sh` and the makefiles would be generated with the correct flags. The build files don't have to be touched. In our case, we have the configuration + build logic in one file (build.gradle) which is imho a bit more confusing. Therefore, rather than doing configuration-related processing in the build.gradle file, I personally prefer to keep the configuration separately (e.g. by passing arch flags on the commandline). We also have platform-specific gradle files, but they are used for a mix of configuration and build logic either, so that won't help. I'm not really against putting this in the build.gradle file though, if that makes building easier for others. But it doesn't improve the readability of that file. ------------- PR: https://git.openjdk.java.net/jfx/pull/666