KLIB: Store native targets in manifest
(cherry picked from commit 6d5bf096c9bdce8ddd2a1651c1a8b85ad07ce116)
This commit is contained in:
committed by
Vasily Levchenko
parent
8deb61713d
commit
35e54cd8c8
+5
-11
@@ -34,18 +34,12 @@ open class TargetedLibraryImpl(
|
|||||||
|
|
||||||
private val target: KonanTarget? get() = access.target
|
private val target: KonanTarget? get() = access.target
|
||||||
|
|
||||||
override val targetList by lazy {
|
override val targetList: List<String>
|
||||||
access.inPlace { it: TargetedKotlinLibraryLayout ->
|
get() = nativeTargets.ifEmpty {
|
||||||
if (!it.targetsDir.exists)
|
// TODO: We have a choice: either assume it is the CURRENT TARGET
|
||||||
// TODO: We have a choice: either assume it is the CURRENT TARGET
|
// or a list of ALL KNOWN targets.
|
||||||
// or a list of ALL KNOWN targets.
|
listOfNotNull(access.target?.visibleName)
|
||||||
access.target ?. let { listOf(it.visibleName) } ?: emptyList()
|
|
||||||
else
|
|
||||||
it.targetsDir.listFiles.map {
|
|
||||||
it.name
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
override val manifestProperties: Properties by lazy {
|
override val manifestProperties: Properties by lazy {
|
||||||
val properties = access.inPlace {
|
val properties = access.inPlace {
|
||||||
|
|||||||
+1
-1
@@ -34,7 +34,7 @@ class KonanLibraryWriterImpl(
|
|||||||
|
|
||||||
val layout: KonanLibraryLayoutForWriter = KonanLibraryLayoutForWriter(libDir, target),
|
val layout: KonanLibraryLayoutForWriter = KonanLibraryLayoutForWriter(libDir, target),
|
||||||
|
|
||||||
base: BaseWriter = BaseWriterImpl(layout, moduleName, versions, builtInsPlatform, nopack, shortName),
|
base: BaseWriter = BaseWriterImpl(layout, moduleName, versions, builtInsPlatform, listOf(target.visibleName), nopack, shortName),
|
||||||
bitcode: BitcodeWriter = BitcodeWriterImpl(layout),
|
bitcode: BitcodeWriter = BitcodeWriterImpl(layout),
|
||||||
metadata: MetadataWriter = MetadataWriterImpl(layout),
|
metadata: MetadataWriter = MetadataWriterImpl(layout),
|
||||||
ir: IrWriter = IrMonoliticWriterImpl(layout)
|
ir: IrWriter = IrMonoliticWriterImpl(layout)
|
||||||
|
|||||||
Reference in New Issue
Block a user