[K/N] Don't build distribution for deprecated targets ^KT-59008

This commit is contained in:
Alexander Shabalin
2023-08-10 16:57:08 +02:00
committed by Space Team
parent e96dcef571
commit 18fb2ec476
5 changed files with 15 additions and 33 deletions
@@ -0,0 +1,10 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.konan.target
fun enabledTargets(platformManager: PlatformManager) = platformManager.enabled.filterNot {
it in KonanTarget.deprecatedTargets && it !in KonanTarget.toleratedDeprecatedTargets
}
@@ -49,8 +49,8 @@ fun KonanTarget.withSanitizer(sanitizer: SanitizerKind? = null) = TargetWithSani
* All known targets with their sanitizers.
*/
val PlatformManager.allTargetsWithSanitizers
get() = this.enabled.flatMap { target ->
get() = enabledTargets(this).flatMap { target ->
listOf(target.withSanitizer()) + target.supportedSanitizers().map {
target.withSanitizer(it)
}
}
}
+2 -2
View File
@@ -98,8 +98,8 @@ allprojects {
void setupHostAndTarget() {
ext.hostName = platformManager.hostName
ext.targetList = platformManager.enabled.collect { it.visibleName } as List
ext.konanTargetList = platformManager.enabled as List
ext.targetList = EnabledTargetsKt.enabledTargets(platformManager).collect { it.visibleName } as List
ext.konanTargetList = EnabledTargetsKt.enabledTargets(platformManager) as List
}
void setupClang(Project project) {
+1 -1
View File
@@ -75,7 +75,7 @@ enum DependencyKind {
def platformManager = rootProject.project(":kotlin-native").ext.platformManager
platformManager.enabled.each { target ->
EnabledTargetsKt.enabledTargets(platformManager).each { target ->
def loader = platformManager.loader(target)
tasks.register("${target}Dependencies", NativeDep) {
-28
View File
@@ -165,8 +165,6 @@ bitcode {
}
compilerArgs.add("-DCUSTOM_ALLOCATOR")
onlyIf { target.supportsThreads() }
}
module("opt_alloc") {
@@ -237,8 +235,6 @@ bitcode {
testFixtures {}
test {}
}
onlyIf { target.supportsThreads() }
}
module("experimental_memory_manager_custom") {
@@ -251,8 +247,6 @@ bitcode {
}
compilerArgs.add("-DCUSTOM_ALLOCATOR")
onlyIf { target.supportsThreads() }
}
module("common_gc") {
@@ -262,8 +256,6 @@ bitcode {
main {}
test {}
}
onlyIf { target.supportsThreads() }
}
module("noop_gc") {
@@ -273,8 +265,6 @@ bitcode {
main {}
testFixtures {}
}
onlyIf { target.supportsThreads() }
}
module("noop_gc_custom") {
@@ -286,8 +276,6 @@ bitcode {
}
compilerArgs.add("-DCUSTOM_ALLOCATOR")
onlyIf { target.supportsThreads() }
}
module("same_thread_ms_gc") {
@@ -298,8 +286,6 @@ bitcode {
testFixtures {}
test {}
}
onlyIf { target.supportsThreads() }
}
module("same_thread_ms_gc_custom") {
@@ -312,8 +298,6 @@ bitcode {
}
compilerArgs.add("-DCUSTOM_ALLOCATOR")
onlyIf { target.supportsThreads() }
}
module("concurrent_ms_gc") {
@@ -324,8 +308,6 @@ bitcode {
testFixtures {}
test {}
}
onlyIf { target.supportsThreads() }
}
module("concurrent_ms_gc_custom") {
@@ -338,8 +320,6 @@ bitcode {
}
compilerArgs.add("-DCUSTOM_ALLOCATOR")
onlyIf { target.supportsThreads() }
}
module("common_gcScheduler") {
@@ -349,8 +329,6 @@ bitcode {
main {}
test {}
}
onlyIf { target.supportsThreads() }
}
module("manual_gcScheduler") {
@@ -359,8 +337,6 @@ bitcode {
sourceSets {
main {}
}
onlyIf { target.supportsThreads() }
}
module("adaptive_gcScheduler") {
@@ -370,8 +346,6 @@ bitcode {
main {}
test {}
}
onlyIf { target.supportsThreads() }
}
module("aggressive_gcScheduler") {
@@ -381,8 +355,6 @@ bitcode {
main {}
test {}
}
onlyIf { target.supportsThreads() }
}
testsGroup("custom_alloc_runtime_tests") {