Juan Farré opened MNG-8768 and commented
I have a use case that I think is of general interest.
I am generating a native image with GraalVM native-maven-plugin, and I'd like to autodetect the presence of the musl gcc compiler wrapper x86_64-linux-musl-gcc in the path to generate a static executable.
When using GraalVM to build an image with the following options,
native-image --static --libc=musl ...
it tries to use x86_64-linux-musl-gcc to compile. If it isn't available in the system path, it crashes.
My idea is to activate a profile when building under Linux x86_64 and the executable x86_64-linux-musl-gcc is detected in the path. This profile would add the options --static and --libc=musl to the native-maven-plugin configuration.
It could be a function like:
executable(executable_name_or_path)
It would search for the executable in the system path (unless a path is given) and check that it's actually an executable.
I think this can be useful for many other use cases.
This issue is a sub-task of MNG-8292
Juan Farré opened MNG-8768 and commented
I have a use case that I think is of general interest.
I am generating a native image with GraalVM native-maven-plugin, and I'd like to autodetect the presence of the musl gcc compiler wrapper x86_64-linux-musl-gcc in the path to generate a static executable.
When using GraalVM to build an image with the following options,
it tries to use x86_64-linux-musl-gcc to compile. If it isn't available in the system path, it crashes.
My idea is to activate a profile when building under Linux x86_64 and the executable x86_64-linux-musl-gcc is detected in the path. This profile would add the options --static and --libc=musl to the native-maven-plugin configuration.
It could be a function like:
It would search for the executable in the system path (unless a path is given) and check that it's actually an executable.
I think this can be useful for many other use cases.
This issue is a sub-task of MNG-8292