Open maciejwalkowiak opened 1 year ago
You're probably building on gh-actions, which should give you relatively easy way to use musl like we've done in spring-shell sample app for e2e tests https://github.com/spring-projects/spring-shell/blob/main/.github/workflows/e2e.yml. You just need to massage build(assume you're on gradle) as things go south if given to win/macos build. graalvm/setup-graalvm
makes it relatively easy to do musl compile.
If you do things from gradle then it's something like https://github.com/spring-projects/spring-shell/blob/206da7463b0d7911ec802246f1f516779502d2d9/spring-shell-samples/spring-shell-samples.gradle#L27-L39 to conditionally add flags.
Just wanted to throw out these tips!
Thanks a lot @jvalkeal. I'll give it a deeper look after holidays!
When running on Linux, Just requires gclib 2.34 - which comes with Ubuntu 22.04 but not with 18.x or 20.x.
There is a way to build a static native executable that comes with bundled gclib:
https://www.graalvm.org/latest/reference-manual/native-image/guides/build-static-executables/