From b394a62703971a3e8324b807b241528391fd061a Mon Sep 17 00:00:00 2001 From: Bruno Ferreira Date: Wed, 24 Jul 2019 10:54:13 +0100 Subject: [PATCH] fix: Adds new flags to fix the native image build The native image build got broken after upgrading the graalvm image. We had to add a new flag to initialize classes and implicitly all of their superclasses during image building (--initialize-at-build-time). The --no-fallback flag is to avoid falling back to JDK if the build is not successfull and the -report-unsupported-elements-at-runtime flag is to report usage of unsupported methods and fields at run time when they are accessed the first time, instead of as an error during image building. --- scripts/publish-native.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/publish-native.sh b/scripts/publish-native.sh index 4f89a767..874f344c 100755 --- a/scripts/publish-native.sh +++ b/scripts/publish-native.sh @@ -81,6 +81,8 @@ function build_cmd() { FLAGS+=' --enable-url-protocols=http,https,file,jar --enable-all-security-services' FLAGS+=' -H:+JNI -H:IncludeResourceBundles=com.sun.org.apache.xerces.internal.impl.msg.XMLMessages' FLAGS+=' -H:+ReportExceptionStackTraces' + FLAGS+=' --no-fallback --initialize-at-build-time' + FLAGS+=' --report-unsupported-elements-at-runtime' # FLAGS+=' -H:+ReportUnsupportedElementsAtRuntime' if [ "${OS_TARGET}" != "darwin" ]