Join Slack
Powered by
we know kotlin/native use LLVM backend for native ...
# kotlin-native
z
Zode
02/17/2022, 3:01 AM
we know kotlin/native use LLVM backend for native target, how could we set optimize-level for native target, like -O0, -O3, -Oz?
e
ephemient
02/17/2022, 3:21 AM
right now there is only a single optimization level. release is optimized, debug is not.
https://github.com/JetBrains/kotlin/blob/master/libraries/tools/kotlin-gradle-plugin-api/src/main/kotlin/org/jetbrains/kotlin/gradle/plugin/mpp/NativeBinaryTypes.kt#L21-L22
which can be overridden per-binary
https://github.com/JetBrains/kotlin/blob/master/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/targets/native/NativeBinaries.kt#L59
👍 2
z
Zode
02/17/2022, 3:25 AM
Thx, it really helps! Does Kotlin/Native have any plans to support multiple optimization levels?
e
ephemient
02/17/2022, 3:30 AM
I'm not sure what the future plans are; I suppose they might just expose the llvm pipeline for you to tweak
11
Views
Open in Slack
Previous
Next