[K/N] Build separate common_gc for each GC.

This commit is contained in:
Alexander Shabalin
2021-09-17 18:50:31 +03:00
committed by Space
parent 3e8c1be5c1
commit f4c5a047ac
2 changed files with 15 additions and 8 deletions
@@ -212,13 +212,14 @@ class KonanConfig(val project: Project, val configuration: CompilerConfiguration
add("legacy_memory_manager.bc")
}
MemoryModel.EXPERIMENTAL -> {
add("common_gc.bc")
when (gc) {
GC.SAME_THREAD_MARK_AND_SWEEP -> {
add("common_gc_stms.bc")
add("experimental_memory_manager_stms.bc")
add("same_thread_ms_gc.bc")
}
GC.NOOP -> {
add("common_gc_noop.bc")
add("experimental_memory_manager_noop.bc")
add("noop_gc.bc")
}
+13 -7
View File
@@ -45,7 +45,8 @@ bitcode {
"${target}LegacyMemoryManager",
"${target}ExperimentalMemoryManagerNoop",
"${target}ExperimentalMemoryManagerStms",
"${target}CommonGc",
"${target}CommonGcNoop",
"${target}CommonGcStms",
"${target}SameThreadMsGc",
"${target}NoopGc"
)
@@ -162,8 +163,13 @@ bitcode {
includeRuntime()
}
create("common_gc", file("src/gc/common")) {
headersDirs += files("src/mm/cpp")
create("common_gc_noop", file("src/gc/common")) {
headersDirs += files("src/gc/noop/cpp", "src/mm/cpp")
includeRuntime()
}
create("common_gc_stms", file("src/gc/common")) {
headersDirs += files("src/gc/stms/cpp", "src/mm/cpp")
includeRuntime()
}
@@ -219,7 +225,7 @@ targetList.forEach { targetName ->
listOf(
"${targetName}Runtime",
"${targetName}ExperimentalMemoryManagerStms",
"${targetName}CommonGc",
"${targetName}CommonGcStms",
"${targetName}SameThreadMsGc",
"${targetName}Mimalloc",
"${targetName}OptAlloc",
@@ -237,7 +243,7 @@ targetList.forEach { targetName ->
listOf(
"${targetName}Runtime",
"${targetName}ExperimentalMemoryManagerStms",
"${targetName}CommonGc",
"${targetName}CommonGcStms",
"${targetName}SameThreadMsGc",
"${targetName}StdAlloc",
"${targetName}Objc"
@@ -254,7 +260,7 @@ targetList.forEach { targetName ->
listOf(
"${targetName}Runtime",
"${targetName}ExperimentalMemoryManagerNoop",
"${targetName}CommonGc",
"${targetName}CommonGcNoop",
"${targetName}NoopGc",
"${targetName}Mimalloc",
"${targetName}OptAlloc",
@@ -272,7 +278,7 @@ targetList.forEach { targetName ->
listOf(
"${targetName}Runtime",
"${targetName}ExperimentalMemoryManagerNoop",
"${targetName}CommonGc",
"${targetName}CommonGcNoop",
"${targetName}NoopGc",
"${targetName}StdAlloc",
"${targetName}Objc"