I would like to write a program using Scala Native but it has to run on a linux host (centos 6.5) with a very old glibc. So I would like to deploy that program as a statically linked executable, e.g. as golang does.
How do I build a statically linked executable with scala-native? Is it possible? If yes, how do I do it? If no, why not?
The sbt option
nativeLinkingOptionstakes aSeq[String]of extra arguments which are passed verbatim to clang during linking.Adding the following to the project build settings works for me in a quick test: