For the love of god, I can't find any mention in t...
# announcements
b
For the love of god, I can't find any mention in the docs on how to enable IR mode for JVM target... Maybe anyone here will know?
😂 2
s
do you mean this?
kotlinOptions.useIR = true
@ gradle.build
b
On
kotlinCompile
tasks?
s
my guess would be in compileKotlin { … }
b
Great, thanks!
r
Why is IR on JVM interesting?
b
It's not, just a future of unified compiler backends for kotlin
There's no reason to use it now unless you're doing compose stuff
l
There's one big reason to use it: find bugs and report them so they get fixed instead of released in the so called "stable" release once they think it's the time.
1
👆 1
a
Copy code
tasks.withType<KotlinCompile> {
    kotlinOptions {
        useIR = true 
        // freeCompilerArgs += listOf("-Xuse-ir")  //fallback
    }
}
l
BTW, there's no need for any fallback (referring to your commented out code).
😅 1
b
Would be nice to have it as an option on target declarations (like for JS). e.g.
Copy code
kotlin {
  jvm(IR) {...}
}
a