[K/N] Add a link for the target deprecation message

This commit is contained in:
Sergey Bogolepov
2023-02-01 16:46:32 +02:00
committed by Space Team
parent 30fd34c2d7
commit 6c449e29cd
2 changed files with 6 additions and 2 deletions
@@ -30,6 +30,8 @@ private val deprecatedTargets = setOf(
KonanTarget.WASM32
)
private const val DEPRECATION_LINK = "https://kotl.in/native-targets-tiers"
class KonanDriver(
val project: Project,
val environment: KotlinCoreEnvironment,
@@ -61,7 +63,8 @@ class KonanDriver(
// Avoid showing warning twice in 2-phase compilation.
if (konanConfig.produce != CompilerOutputKind.LIBRARY && konanConfig.target in deprecatedTargets) {
configuration.report(CompilerMessageSeverity.STRONG_WARNING, "target ${konanConfig.target} is deprecated and will be removed soon.")
configuration.report(CompilerMessageSeverity.STRONG_WARNING,
"target ${konanConfig.target} is deprecated and will be removed soon. See $DEPRECATION_LINK")
}
ensureModuleName(konanConfig)
@@ -8,7 +8,8 @@ package org.jetbrains.kotlin.konan.target
import org.jetbrains.kotlin.konan.util.Named
import java.io.Serializable
const val DEPRECATED_TARGET_MESSAGE = "Target is deprecated and will be removed soon"
private const val DEPRECATION_LINK = "https://kotl.in/native-targets-tiers"
const val DEPRECATED_TARGET_MESSAGE = "Target is deprecated and will be removed soon. See $DEPRECATION_LINK"
sealed class KonanTarget(override val name: String, val family: Family, val architecture: Architecture) : Named, Serializable {
object ANDROID_X64 : KonanTarget("android_x64", Family.ANDROID, Architecture.X64)