[Rev 01] RFR: Add support for building on AArch64
Erik Helin
ehelin at openjdk.org
Mon Nov 4 10:06:03 UTC 2019
On Fri, 1 Nov 2019 02:15:25 GMT, Nick Gasson <ngasson at openjdk.org> wrote:
> The pull request has been updated with additional changes.
>
> ----------------
>
> Added commits:
> - 0417521a: Correct value of os.arch on Mac
>
> Changes:
> - all: https://git.openjdk.java.net/skara/pull/231/files
> - new: https://git.openjdk.java.net/skara/pull/231/files/fd6a7291..0417521a
>
> Webrevs:
> - full: https://webrevs.openjdk.java.net/skara/231/webrev.01
> - incr: https://webrevs.openjdk.java.net/skara/231/webrev.00-01
>
> Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
> Patch: https://git.openjdk.java.net/skara/pull/231.diff
> Fetch: git fetch https://git.openjdk.java.net/skara pull/231/head:pull/231
cli/build.gradle line 103:
> 102: sha256 = project.jdkSha256
> 103: }
> 104: }
This is unfortunately not how the `jdk` property of the `images` target is meant to be used.
The JDK fully supports cross-platform linking, something we make use of in Skara. This means if you build the `:cli:images` target on a Linux x64 machine then you will actually get fully working Skara distributions for Windows, macOS *and* Linux (all x64), since we are downloading the JDKs for macOS, Windows and Linux. With this patch we only get Linux x64 distributions.
Fortunately the JDK not only supports cross-jlink across operating system, it also supports cross-linking across CPU architectures. So I would prefer to be able to write:
linux_x64 {
modules = ext.modules
launchers = ext.launchers
man = 'cli/resources/man'
bundles = ['zip', 'tar.gz']
jdk {
url = 'https://download.java.net/java/GA/jdk12/GPL/openjdk-12_linux-x64_bin.tar.gz'
sha256 = 'b43bc15f4934f6d321170419f2c24451486bc848a2179af5e49d10721438dd56'
}
}
linux_aarch64 {
modules = ext.modules
launchers = ext.launchers
man = 'cli/resources/man'
bundles = ['zip', 'tar.gz']
jdk {
url = 'https://github.com/AdoptOpenJDK/openjdk12-binaries/releases/download/jdk-12.0.2%2B10/OpenJDK12U-jdk_aarch64_linux_hotspot_12.0.2_10.tar.gz'
sha256 = ''855f046afc5a5230ad6da45a5c811194267acd1748f16b648bfe5710703fe8c'
}
}
This way we will always produce Linux AArch64 images on Linux x64 hosts. To get this to work you need to do some minor changes to `ImagesPlugin.java` (and you might have to do some adjustments to `LinkTask.java`). Do you want to take a stab at that? Or do you want me to try and hack something together?
gradlew line 105:
> 104: ;;
> 105: Darwin )
> 106: JDK_URL="${JDK_MACOS_URL}"
This part looks good p
Hi Nick,
first of all, thanks for contributing! We definitely want to support building the Skara tooling on AArch64, but please see my inline comments, it seems that you may have misinterpreted how the `images` target is meant to work.
Thanks!
Erik
----------------
Disapproved by ehelin (Reviewer).
PR: https://git.openjdk.java.net/skara/pull/231
More information about the skara-dev
mailing list