mirror of
https://github.com/apple/pkl.git
synced 2026-04-20 23:41:27 +02:00
Only build static executable if musl toolchain is installed (#83)
This improves the development experience for (WSL) Linux users. They can now run "./gradlew buildNative" without having a musl toolchain installed. In this case, only the dynamically linked executable will be built.
This commit is contained in:
@@ -95,6 +95,11 @@ open class BuildInfo(project: Project) {
|
||||
java.lang.Boolean.getBoolean("releaseBuild")
|
||||
}
|
||||
|
||||
val hasMuslToolchain: Boolean by lazy {
|
||||
// see "install musl" in .circleci/jobs/BuildNativeJob.pkl
|
||||
File(System.getProperty("user.home"), "staticdeps/bin/x86_64-linux-musl-gcc").exists()
|
||||
}
|
||||
|
||||
val os: org.gradle.internal.os.OperatingSystem by lazy {
|
||||
org.gradle.internal.os.OperatingSystem.current()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user