Is there any flag in `konanc` for incremental comp...
# kotlin-native
x
Is there any flag in
konanc
for incremental compilation of the compiler frontend (Kotlin Ir klib)? I saw
-Xuse-fir-ic
and
-Xuse-fir-lt
in
konanc -X
, which seem to be only effective for JVM and only for Maven compiler.
From here https://youtrack.jetbrains.com/issue/KT-42294/Improve-Kotlin-Native-compilation-time#june-2023
Currently, Kotlin/Native compiles all project files in a single batch in two stages: 1. Compile project sources to IR in
klib
, 2. Compile
klibs
into a binary (excluding cached external dependencies in debug mode). This means that even if the developer changes just one line, the whole project is recompiled, which is obviously not desirable.
In my daily use, the performance of stage2 in debug mode is relatively good, but the problems of stage1 have been exposed. In my project, on average, the process of compiling klib with Konanc takes about 30 seconds. Is there any room for optimization on stage1 now?