[K/N] Move memmem from Porting.h to KString.cpp ^KT-59008

This commit is contained in:
Alexander Shabalin
2023-08-24 19:09:43 +02:00
committed by Space Cloud
parent d9071aed78
commit 27c85a059f
5 changed files with 14 additions and 32 deletions
@@ -43,7 +43,6 @@ sealed class ClangArgs(
"WINDOWS".takeIf { target.family == Family.MINGW },
"MACOSX".takeIf { target.family == Family.OSX },
"NO_MEMMEM".takeUnless { target.suportsMemMem() },
"NO_64BIT_ATOMIC".takeUnless { target.supports64BitAtomics() },
"NO_UNALIGNED_ACCESS".takeUnless { target.supportsUnalignedAccess() },
"FORBID_BUILTIN_MUL_OVERFLOW".takeUnless { target.supports64BitMulOverflow() },
@@ -99,14 +99,6 @@ fun KonanTarget.supportsExceptions(): Boolean = when(this) {
else -> true
}
fun KonanTarget.suportsMemMem(): Boolean = when (this) {
is KonanTarget.WASM32 -> false
is KonanTarget.MINGW_X86 -> false
is KonanTarget.MINGW_X64 -> false
is KonanTarget.ZEPHYR -> false
else -> true
}
fun KonanTarget.supportsObjcInterop(): Boolean = family.isAppleFamily
fun KonanTarget.hasFoundationFramework(): Boolean = family.isAppleFamily
fun KonanTarget.hasUIKitFramework(): Boolean = family == Family.IOS || family == Family.TVOS