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

Support append BP_NATIVE_IMAGE_BUILD_ARGUMENTS to the end of command #288

Open
czp3009 opened this issue Sep 12, 2023 · 1 comment
Open
Labels
hacktoberfest Hacktoberfest eligible note:ideal-for-contribution An issue that a contributor can help us with type:enhancement A general enhancement

Comments

@czp3009
Copy link

czp3009 commented Sep 12, 2023

Describe the Enhancement

After using BP_NATIVE_IMAGE_BUILD_ARGUMENTS, these arguments are always added to the very beginning of the command(before -cp), example:

[creator]         Executing native-image --no-fallback -H:+StaticExecutableWithDynamicLibC @/workspace/META-INF/native-image/argfile $BP_NATIVE_IMAGE_BUILD_ARGUMENTS -H:Name=/layers/paketo-buildpacks_native-image/native-image/xxxx -cp xxxx

Is it possible to append BP_NATIVE_IMAGE_BUILD_ARGUMENTS to the end of the command instead of the beginning? example:

native-image --no-fallback -H:+StaticExecutableWithDynamicLibC @/workspace/META-INF/native-image/argfile -H:Name=/layers/paketo-buildpacks_native-image/native-image/xxxx -cp xxxx $BP_NATIVE_IMAGE_BUILD_ARGUMENTS

Possible Solution

Add another environment variable to switch this feature on and off

Motivation

In some cases, it is necessary to override graalvm native image arguments that are included in some of the dependency jars. additional command line arguments must be placed at the end of the line for this to work (actually, after -cp)

example: apache/camel-quarkus#5006 (comment)

In order to override RunReachabilityHandlersConcurrently in google-gax, this parameter must be placed last

@dmikusa dmikusa added the type:enhancement A general enhancement label Sep 13, 2023
@dmikusa
Copy link
Contributor

dmikusa commented Sep 13, 2023

This sounds plausible. The way the command is built up, it may not be as easy as it sounds to guarantee though. We can look at possible solutions.

I'll mark this as a feature request.

@dmikusa dmikusa added the note:ideal-for-contribution An issue that a contributor can help us with label Sep 13, 2023
@anthonydahanne anthonydahanne added the hacktoberfest Hacktoberfest eligible label Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Hacktoberfest eligible note:ideal-for-contribution An issue that a contributor can help us with type:enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants