[Native] TargetedLibraryImpl: Respect 'commonizerNativeTargets' property
^KT-50847 Verification Pending
This commit is contained in:
committed by
Space
parent
5e931a3039
commit
0fd65ab1a0
@@ -109,7 +109,7 @@ val KotlinLibrary.containsErrorCode: Boolean
|
||||
val KotlinLibrary.commonizerTarget: String?
|
||||
get() = manifestProperties.getProperty(KLIB_PROPERTY_COMMONIZER_TARGET)
|
||||
|
||||
val KotlinLibrary.commonizerNativeTargets: List<String>?
|
||||
val BaseKotlinLibrary.commonizerNativeTargets: List<String>?
|
||||
get() = if (manifestProperties.containsKey(KLIB_PROPERTY_COMMONIZER_NATIVE_TARGETS))
|
||||
manifestProperties.propertyList(KLIB_PROPERTY_COMMONIZER_NATIVE_TARGETS, escapeInQuotes = true)
|
||||
else null
|
||||
|
||||
+7
-6
@@ -35,11 +35,12 @@ open class TargetedLibraryImpl(
|
||||
private val target: KonanTarget? get() = access.target
|
||||
|
||||
override val targetList: List<String>
|
||||
get() = nativeTargets.ifEmpty {
|
||||
// TODO: We have a choice: either assume it is the CURRENT TARGET
|
||||
// or a list of ALL KNOWN targets.
|
||||
listOfNotNull(access.target?.visibleName)
|
||||
}
|
||||
get() = commonizerNativeTargets?.takeIf { it.isNotEmpty() }
|
||||
?: nativeTargets.takeIf { it.isNotEmpty() }
|
||||
?: // TODO: We have a choice: either assume it is the CURRENT TARGET
|
||||
// or a list of ALL KNOWN targets.
|
||||
listOfNotNull(access.target?.visibleName)
|
||||
|
||||
|
||||
override val manifestProperties: Properties by lazy {
|
||||
val properties = base.manifestProperties
|
||||
@@ -110,4 +111,4 @@ fun createKonanLibraryComponents(
|
||||
return base.componentList.map {
|
||||
createKonanLibrary(libraryFile, it, target, isDefault)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user