diff --git a/quartz/build.gradle.kts b/quartz/build.gradle.kts index d4ebb17ae1..cddf5558dc 100644 --- a/quartz/build.gradle.kts +++ b/quartz/build.gradle.kts @@ -94,12 +94,13 @@ kotlin { } // Enable LLVM optimizations for native test binaries (benchmark accuracy). - // Without -opt, K/N test binaries compile in debug mode (~20× slower). + // Without opt, K/N test binaries compile in debug mode (~20× slower). + // Use the binary-level API instead of -opt freeCompilerArg to avoid the + // "Unsupported combination of flags: -opt and -g" conflict in Kotlin/Native 2.1+. targets.withType().configureEach { - compilations["test"].compileTaskProvider.configure { - compilerOptions { - freeCompilerArgs.add("-opt") - } + binaries.withType().configureEach { + optimized = true + debuggable = false } }