Is there a Gradle task available in the Kotlin cod...
# stdlib
n
Is there a Gradle task available in the Kotlin code base for building the Common module of the Kotlin Std lib?
In the Kotlin code base there is the coreLibsTest Gradle Task, which can build the Kotlin Std lib. After running the task it fails on one of the tests. Will there still be a built copy of the Std lib available (incl the Common module) when the tests fail, and if so where is it located?
i
:kotlin-stdlib-common:assemble
👍 1
Is the failing test about binary compatibility validation?
👌 1
n
Using the
:kotlin-stdlib-common:assemble
Gradle task worked. Now to find out what has been generated, where it is located, and how to connect it to the custom rp2040 Kotlin target.
When the Std lib is generated, is it in klib form?
i
No, it's a jar with legacy .kotlin-metadata format files. I don't think it would be anyhow useful to you, if you're trying to build a custom K/N target
n
Just found out that the Kotlin Native compiler requires a series of bc files for the Std lib (per target): compiler_interface.bc & runtime.bc Requiring bc files for the Std lib doesn't make any sense (is very weird). All those files look more Kotlin Native related. I have tried a ugly hack by copying stuff from kotlin_repo/kotlin-native/dist/klib/common/stdlib/default/targets/linuxX64 to kotlin-native/dist/klib/common/stdlib/default/targets/rp2040, and adding rp2040 to the manifest file in kotlin_repo/kotlin-native/dist/klib/common/stdlib/default. Applying this hack managed to resolve the error, although it could come back to haunt me later.
Not sure what the relationship is between the Std lib, and the Kotlin Native infrastructure (compiler, K/N runtime etc).