beehive-lab / TornadoVM

TornadoVM: A practical and efficient heterogeneous programming framework for managed languages
https://www.tornadovm.org
Apache License 2.0
1.18k stars 113 forks source link

Extend TornadoVM installer script with SapMachine OpenJDK 21 and Microsoft OpenJDK 21 #390

Closed stratika closed 5 months ago

stratika commented 5 months ago

Description

This PR extends the tornadovm-installer script with two new JDK distributions for Linux, macOS, and Windows (both x86_64 and ARM architecture).

The script now will print the list of JDKs:

./bin/tornadovm-installer --listJDKs

    TornadoVM Installer - Select a JDK implementation to install with TornadoVM:

    jdk21             : Install TornadoVM with OpenJDK 21 (Oracle OpenJDK)
    graal-jdk-21      : Install TornadoVM with GraalVM and JDK 21 (GraalVM 23.1.0)
    mandrel-jdk-21    : Install TornadoVM with Mandrel and JDK 21 (GraalVM 23.1.0)
    corretto-jdk-21   : Install TornadoVM with Corretto JDK 21
    microsoft-jdk-21  : Install TornadoVM with Microsoft JDK 21
    zulu-jdk-21       : Install TornadoVM with Azul Zulu JDK 21
    temurin-jdk-21    : Install TornadoVM with Eclipse Temurin JDK 21
    sapmachine-jdk-21 : Install TornadoVM with SapMachine OpenJDK 21

    Usage:
      $ ./bin/tornadovm-installer  --jdk <JDK_VERSION> --backend <BACKEND>

    If you want to select another version of OpenJDK, you can use --javaHome <pathToJavaHome> and install as follows:
      $ ./bin/tornadovm-installer --backend <BACKEND> --javaHome <pathToJavaHome>

Note: The Microsoft JDK 21 provides a distributions for Windows OS on ARM. To my knowledge we do not have such a system to test it. However, I add the link for the binary in the TornadoVM configuration list.

Backend/s tested

Mark the backends affected by this PR.

OS tested

Mark the OS where this PR is tested.

Did you check on FPGAs?

If it is applicable, check your changes on FPGAs.

How to test the new patch?

To test on Linux/macOS:

./bin/tornadovm-installer --jdk microsoft-jdk-21 --backend opencl
source setvars.sh
tornado -version
make tests
./bin/tornadovm-installer --jdk sapmachine-jdk-21 --backend ptx
source setvars.sh
tornado -version
make tests

To test on Windows:

python bin\tornadovm-installer --jdk microsoft-jdk-21 --backend ptx
setvars.cmd
python %TORNADO_SDK%\bin\tornado -version
nmake /f Makefile.mak tests
python bin\tornadovm-installer --jdk sapmachine-jdk-21 --backend spirv
setvars.cmd
python %TORNADO_SDK%\bin\tornado -version
nmake /f Makefile.mak tests