Skip to content

Commit 49358f6

Browse files
Fix scala native building issues and update mill (#479)
- Update mill to 1.0.3 and force to use the JVM version instead of the native version (issues in recent ubuntu - com-lihaoyi/mill#5508) - compile statically by default in Linux
1 parent df67756 commit 49358f6

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

build.mill

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//| mill-version: 1.0.2
1+
//| mill-version: 1.0.3-jvm
22
//| mvnDeps:
33
//| - com.lihaoyi::mill-contrib-jmh:$MILL_VERSION
44
//| - com.lihaoyi::mill-contrib-versionfile:$MILL_VERSION
@@ -201,8 +201,9 @@ object sjsonnet extends VersionFileModule {
201201
mvn"org.virtuslab::scala-yaml::0.3.0"
202202
)
203203

204-
def nativeLinkingOptions = super.nativeLinkingOptions() ++
205-
Seq("-L/usr/local/opt/openssl@3/lib")
204+
val osName = System.getProperty("os.name").toLowerCase
205+
206+
def nativeLinkingOptions = super.nativeLinkingOptions() ++ (if (osName == "linux") Seq("-static") else Seq())
206207

207208
def releaseMode = ReleaseMode.ReleaseFull
208209
def nativeLTO = LTO.Full

0 commit comments

Comments
 (0)