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
|
||||
|
||||
override val targetList by lazy {
|
||||
access.inPlace { it: TargetedKotlinLibraryLayout ->
|
||||
if (!it.targetsDir.exists)
|
||||
// TODO: We have a choice: either assume it is the CURRENT TARGET
|
||||
// or a list of ALL KNOWN targets.
|
||||
access.target ?. let { listOf(it.visibleName) } ?: emptyList()
|
||||
else
|
||||
it.targetsDir.listFiles.map {
|
||||
it.name
|
||||
}
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
override val manifestProperties: Properties by lazy {
|
||||
val properties = access.inPlace {
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ class KonanLibraryWriterImpl(
|
||||
|
||||
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),
|
||||
metadata: MetadataWriter = MetadataWriterImpl(layout),
|
||||
ir: IrWriter = IrMonoliticWriterImpl(layout)
|
||||
|
||||
Reference in New Issue
Block a user