From 70e77347f36126ce2ca26533b8212228a66ed1ad Mon Sep 17 00:00:00 2001 From: Daniel Chao Date: Thu, 27 Jun 2024 07:39:17 -0700 Subject: [PATCH] Use compatible architecture in native executables (#551) Use the most compatible architecture; for example, x86-64 instead of x86-64-v3. --- pkl-cli/pkl-cli.gradle.kts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkl-cli/pkl-cli.gradle.kts b/pkl-cli/pkl-cli.gradle.kts index 607a3401..d148e9c7 100644 --- a/pkl-cli/pkl-cli.gradle.kts +++ b/pkl-cli/pkl-cli.gradle.kts @@ -232,6 +232,7 @@ fun Exec.configureExecutable( if (!buildInfo.isReleaseBuild) { add("-Ob") } + add("-march=compatibility") // native-image rejects non-existing class path entries -> filter add("--class-path") val pathInput = sourceSets.main.get().output + configurations.runtimeClasspath.get() @@ -318,7 +319,7 @@ val windowsExecutableAmd64: TaskProvider by tasks.registering(Exec::class) configureExecutable( buildInfo.graalVmAmd64, layout.buildDirectory.file("executable/pkl-windows-amd64"), - listOf("-Dfile.encoding=UTF-8", "-march=compatibility") + listOf("-Dfile.encoding=UTF-8") ) }