Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation issue in NativeImageBuildStep #20592

Merged
merged 1 commit into from
Oct 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ ArtifactResultBuildItem nativeSourcesResult(NativeConfig nativeConfig,
.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)
.setContainerBuild(nativeConfig.isContainerBuild())
.build();
List<String> command = nativeImageArgs.getArgs();
try (FileOutputStream commandFOS = new FileOutputStream(outputDir.resolve("native-image.args").toFile())) {
Expand Down Expand Up @@ -201,6 +202,7 @@ public NativeImageBuildItem build(NativeConfig nativeConfig, NativeImageSourceJa
.setRunnerJarName(runnerJarName)
.setNativeImageName(nativeImageName)
.setNoPIE(noPIE)
.setContainerBuild(isContainerBuild)
.setGraalVMVersion(graalVMVersion)
.build();

Expand Down Expand Up @@ -474,6 +476,7 @@ static class Builder {
private Path outputDir;
private String runnerJarName;
private String noPIE = "";
private boolean isContainerBuild = false;
private GraalVM.Version graalVMVersion = GraalVM.Version.UNVERSIONED;
private String nativeImageName;
private boolean classpathIsBroken;
Expand Down Expand Up @@ -524,6 +527,11 @@ public Builder setNoPIE(String noPIE) {
return this;
}

public Builder setContainerBuild(boolean containerBuild) {
isContainerBuild = containerBuild;
return this;
}

public Builder setGraalVMVersion(GraalVM.Version graalVMVersion) {
this.graalVMVersion = graalVMVersion;
return this;
Expand Down