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:
translatenix
2024-02-07 20:57:53 -08:00
committed by Dan Chao
parent c6a9859969
commit 7ab47e825f
3 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -256,7 +256,7 @@ val testLinuxExecutableAarch64 by tasks.registering(Test::class) {
}
val testAlpineExecutableAmd64 by tasks.registering(Test::class) {
enabled = buildInfo.os.isLinux && buildInfo.arch == "amd64"
enabled = buildInfo.os.isLinux && buildInfo.arch == "amd64" && buildInfo.hasMuslToolchain
dependsOn(":pkl-cli:alpineExecutableAmd64")
inputs.dir("src/test/files/LanguageSnippetTests/input")