Skip to content

Commit

Permalink
Merge pull request #21809 from zakkak/fix-native-sources
Browse files Browse the repository at this point in the history
Fix native-image arguments generation for native-sources package type
  • Loading branch information
gsmet authored Dec 9, 2021
2 parents 4224161 + 53b8498 commit a690b0c
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ ArtifactResultBuildItem nativeSourcesResult(NativeConfig nativeConfig,
List<NativeImageSystemPropertyBuildItem> nativeImageProperties,
List<ExcludeConfigBuildItem> excludeConfigs,
NativeImageAllowIncompleteClasspathAggregateBuildItem incompleteClassPathAllowed,
List<JPMSExportBuildItem> jpmsExportBuildItems) {
List<JPMSExportBuildItem> jpmsExportBuildItems,
List<NativeImageSecurityProviderBuildItem> nativeImageSecurityProviders) {

Path outputDir;
try {
Expand All @@ -109,13 +110,15 @@ ArtifactResultBuildItem nativeSourcesResult(NativeConfig nativeConfig,
.setNativeConfig(nativeConfig)
.setOutputTargetBuildItem(outputTargetBuildItem)
.setNativeImageProperties(nativeImageProperties)
.setBrokenClasspath(incompleteClassPathAllowed.isAllow())
.setExcludeConfigs(excludeConfigs)
.setJPMSExportBuildItems(jpmsExportBuildItems)
.setBrokenClasspath(incompleteClassPathAllowed.isAllow())
.setNativeImageSecurityProviders(nativeImageSecurityProviders)
.setOutputDir(outputDir)
.setRunnerJarName(runnerJar.getFileName().toString())
// the path to native-image is not known now, it is only known at the time the native-sources will be consumed
.setNativeImageName(nativeImageName)
.setGraalVMVersion(GraalVM.Version.CURRENT)
.build();
List<String> command = nativeImageArgs.getArgs();
try (FileOutputStream commandFOS = new FileOutputStream(outputDir.resolve("native-image.args").toFile())) {
Expand Down

0 comments on commit a690b0c

Please sign in to comment.