Added GraalVM configuration to create a native binary (#452)

* Initial GraalVM configuration

* graalvm reflection changes for v0.7.4

* graalvm removed unneeded options for native-image

* updated gradle plugin org.mikeneck.graalvm-native-image to 1.1.0

* moved from gradle graalvm-native-image plugin to native-build.sh

* added missing graalvm reflection config for receive

* refactored native-build.sh to a gradle task buildNativeBinary
This commit is contained in:
Michael Kebe 2021-01-23 11:11:50 +01:00 committed by GitHub
parent cb596c15f1
commit a709447536
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 1590 additions and 0 deletions

View file

@ -83,6 +83,20 @@ dependencies. If you have a recent gradle version installed, you can replace `./
./gradlew distTar
### Building a native binary with GraalVM
It is possible to build a native binary with [GraalVM](https://www.graalvm.org).
1. [Install GraalVM and setup the enviroment](https://www.graalvm.org/docs/getting-started/#install-graalvm)
2. [Install prerequisites](https://www.graalvm.org/reference-manual/native-image/#prerequisites)
2. Execute Gradle:
./gradle nativeImage
The binary is available at
build/native-image/signal-cli
## Troubleshooting
If you use a version of the Oracle JRE and get an InvalidKeyException you need to enable unlimited strength crypto. See https://stackoverflow.com/questions/6481627/java-security-illegal-key-size-or-default-parameters for instructions.