Skip to content

Commit ddf2e89

Browse files
ALikhachevSpace Team
authored andcommitted
[BTA] Add printing daemon JVM options to debug level
KGP expects these logs in some tests and overall it's useful for debugging purposes. Relates to KT-78199
1 parent e686aa0 commit ddf2e89

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

compiler/build-tools/kotlin-build-tools-impl/src/main/kotlin/org/jetbrains/kotlin/buildtools/internal/jvm/operations/JvmCompilationOperationImpl.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,13 @@ internal class JvmCompilationOperationImpl(
203203
daemonJVMOptions = jvmOptions,
204204
daemonOptions = daemonOptions
205205
) ?: return ExitCode.INTERNAL_ERROR.asCompilationResult
206+
207+
if (loggerAdapter.kotlinLogger.isDebugEnabled) {
208+
daemon.getDaemonJVMOptions().takeIf { it.isGood }?.let { jvmOpts ->
209+
loggerAdapter.kotlinLogger.debug("Kotlin compile daemon JVM options: ${jvmOpts.get().mappers.flatMap { it.toArgs("-") }}")
210+
}
211+
}
212+
206213
val daemonCompileOptions = toDaemonCompilationOptions()
207214
loggerAdapter.kotlinLogger.info("Options for KOTLIN DAEMON: $daemonCompileOptions")
208215
val isIncrementalCompilation = daemonCompileOptions is IncrementalCompilationOptions

0 commit comments

Comments
 (0)