From 86ad8048481d75fc208e2ff5b39b933a71ca8bc9 Mon Sep 17 00:00:00 2001 From: Svyatoslav Scherbina Date: Fri, 11 Feb 2022 16:01:46 +0300 Subject: [PATCH] Native: remove support for pre-Xcode 12 libclang_rt Kotlin/Native doesn't support Xcode versions older than 12.5 anymore, so just remove the obsolete code. --- .../main/kotlin/org/jetbrains/kotlin/konan/target/Linker.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/target/Linker.kt b/kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/target/Linker.kt index f3ca9d72e30..f4c90e027f4 100644 --- a/kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/target/Linker.kt +++ b/kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/target/Linker.kt @@ -187,10 +187,9 @@ class MacOSBasedLinker(targetProperties: AppleConfigurables) Family.OSX -> "osx" else -> error("Target $target is unsupported") } - // TODO: remove after `minimalXcodeVersion` will be 12. // Separate libclang_rt version for simulator appeared in Xcode 12. - val compilerRtForSimulatorExists = Xcode.current.version.substringBefore('.').toInt() >= 12 - val suffix = if ((libraryName.isNotEmpty() || compilerRtForSimulatorExists) && targetTriple.isSimulator) { + // We don't support Xcode versions older than 12.5 anymore, so no need to check Xcode version. + val suffix = if (targetTriple.isSimulator) { "sim" } else { ""