[K/N] Manually compact mimalloc heap ^KT-53182
Merge-request: KT-MR-7111 Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
This commit is contained in:
committed by
Space
parent
9210108d5a
commit
f009d9b633
@@ -56,6 +56,7 @@ sealed class ClangArgs(
|
||||
"REPORT_BACKTRACE_TO_IOS_CRASH_LOG".takeIf { target.supportsIosCrashLog() },
|
||||
"NEED_SMALL_BINARY".takeIf { target.needSmallBinary() },
|
||||
"TARGET_HAS_ADDRESS_DEPENDENCY".takeIf { target.hasAddressDependencyInMemoryModel() },
|
||||
"SUPPORTS_GRAND_CENTRAL_DISPATCH".takeIf { target.supportsGrandCentralDispatch },
|
||||
).map { "KONAN_$it=1" }
|
||||
val otherOptions = listOfNotNull(
|
||||
"USE_ELF_SYMBOLS=1".takeIf { target.binaryFormat() == BinaryFormat.ELF },
|
||||
|
||||
+5
@@ -172,6 +172,11 @@ fun KonanTarget.hasAddressDependencyInMemoryModel(): Boolean =
|
||||
Architecture.MIPS32, Architecture.MIPSEL32, Architecture.WASM32 -> false
|
||||
}
|
||||
|
||||
val KonanTarget.supportsGrandCentralDispatch
|
||||
get() = when(family) {
|
||||
Family.WATCHOS, Family.IOS, Family.TVOS, Family.OSX -> true
|
||||
else -> false
|
||||
}
|
||||
|
||||
// TODO: this is bad function. It should be replaced by capabilities functions like above
|
||||
// but two affected targets are too strange, so we postpone it
|
||||
|
||||
Reference in New Issue
Block a user