@@ -49,20 +49,21 @@ graalvmNative {
4949 richOutput = true
5050 // requiredVersion = '22.3'
5151
52- if (project. hasProperty(' LIB' )) {
53- imageName = " libxtracfgjni"
54- sharedLibrary = true
55- buildArgs(" --native-compiler-path=${ project.projectDir} /../c/native-image/static-compiler-${ targetos} .${ targetos == 'windows' ? 'bat' : 'sh'} " )
56- if (targetos != ' windows' ) {
57- buildArgs(' --native-compiler-options=-fPIC' )
58- }
59- // buildArgs('-march=native')
60- buildArgs(' -O2' ) // TODO -O3 image is 50% larger than -O2, test -Os with JDK 23
61- // buildArgs('--pgo') see https://www.graalvm.org/latest/reference-manual/native-image/optimizations-and-performance/PGO/
62-
63- // for statically linking xtracfg
64- buildArgs(' --features=de.ii.xtraplatform.cli.NativeFeature' )
52+ imageName = " libxtracfgjni"
53+ sharedLibrary = true
54+ buildArgs(" --native-compiler-path=${ project.projectDir} /../c/native-image/static-compiler-${ targetos} .${ targetos == 'windows' ? 'bat' : 'sh'} " )
55+ if (targetos != ' windows' ) {
56+ buildArgs(' --native-compiler-options=-fPIC' )
6557 }
58+ if (targetos == ' darwin' ) {
59+ buildArgs(' --native-compiler-options=-Wl,-framework,Security' )
60+ }
61+ // buildArgs('-march=native')
62+ buildArgs(' -O2' ) // TODO -O3 image is 50% larger than -O2, test -Os with JDK 23
63+ // buildArgs('--pgo') see https://www.graalvm.org/latest/reference-manual/native-image/optimizations-and-performance/PGO/
64+
65+ // for statically linking xtracfg
66+ buildArgs(' --features=de.ii.xtraplatform.cli.NativeFeature' )
6667
6768 // buildArgs("--module-path", "${buildDir}/install/ldproxy/lib")
6869 // buildArgs("--module", application.mainModule.get())
@@ -77,18 +78,10 @@ graalvmNative {
7778 // buildArgs('-H:-UseServiceLoaderFeature')
7879 // resources.autodetect()
7980
80- if (! project. hasProperty(' LIB' ) && targetos == ' linux' ) {
81- buildArgs(' -H:+StaticExecutableWithDynamicLibC' )
82- }
83- if (targetos == ' darwin' ) {
84- buildArgs(' --native-compiler-options=-Wl,-framework,Security' )
85- }
86-
8781 // for jackson???
8882 // buildArgs('-H:+PrintClassInitialization')
8983 // buildArgs("--allow-incomplete-classpath")
9084
91-
9285 buildArgs(" --add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk=ALL-UNNAMED" )
9386 buildArgs(" --add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.hosted=ALL-UNNAMED" )
9487 buildArgs(" --add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.hosted.c=ALL-UNNAMED" )
0 commit comments