Use TargetTriple in backend to simplify code.

This commit is contained in:
Sergey Bogolepov
2021-04-05 17:29:09 +07:00
committed by TeamCityServer
parent f94e8f95d1
commit 15dcb36f47
3 changed files with 9 additions and 31 deletions
@@ -171,10 +171,6 @@ class MacOSBasedLinker(targetProperties: AppleConfigurables)
private val strip = "$absoluteTargetToolchain/usr/bin/strip"
private val dsymutil = "$absoluteTargetToolchain/usr/bin/dsymutil"
private val KonanTarget.isSimulator: Boolean
get() = this == KonanTarget.TVOS_X64 || this == KonanTarget.IOS_X64 ||
this == KonanTarget.WATCHOS_X86 || this == KonanTarget.WATCHOS_X64
private val compilerRtDir: String? by lazy {
val dir = File("$absoluteTargetToolchain/usr/lib/clang/").listFiles.firstOrNull()?.absolutePath
if (dir != null) "$dir/lib/darwin/" else null
@@ -188,7 +184,7 @@ class MacOSBasedLinker(targetProperties: AppleConfigurables)
Family.OSX -> "osx"
else -> error("Target $target is unsupported")
}
val suffix = if (libraryName.isNotEmpty() && target.isSimulator) {
val suffix = if (libraryName.isNotEmpty() && targetTriple.isSimulator) {
"sim"
} else {
""