Hint for users about disabling caches (#4082)

This commit is contained in:
LepilkinaElena
2020-04-10 12:10:43 +03:00
parent 721a84ea44
commit 4d392b1b0b
2 changed files with 12 additions and 3 deletions
@@ -133,7 +133,17 @@ internal class Linker(val context: Context) {
it.execute()
}
} catch (e: KonanExternalToolFailure) {
context.reportCompilationError("${e.toolName} invocation reported errors\n${e.message}")
val extraUserInfo =
if (caches.static.isNotEmpty() || caches.dynamic.isNotEmpty())
"""
Please try to disable compiler caches and rerun the build. To disable compiler caches, add the following line to the gradle.properties file in the project's root directory:
kotlin.native.cacheKind=none
Also, consider filing an issue with full Gradle log here: https://kotl.in/issue
""".trimIndent()
else ""
context.reportCompilationError("${e.toolName} invocation reported errors\n$extraUserInfo\n${e.message}")
}
return executable
}
@@ -111,8 +111,7 @@ open class Command(initialCommand: List<String>) {
if (code != 0) throw KonanExternalToolFailure("""
The ${command[0]} command returned non-zero exit code: $code.
output:
${output.joinToString("\n")}
""".trimIndent(), command[0])
""".trimIndent() + "\n${output.joinToString("\n")}", command[0])
// Show warnings in case of success linkage.
if (stdError.isNotEmpty()) {
stdError.joinToString("\n").also { message ->