Hi. How do I use the new IR compiler from the com...
# javascript
n
Hi. How do I use the new IR compiler from the command-line?
I’m getting the build error
This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
The Kotlin compilation is one recipe in a large Make build, and it is not practical to convert it to Gradle
j
-Xuse-ir
Wait i think that was for JVM. JS is like -Xir-produce-js
If you run with -X it'll tell you all the options
Or create a Gradle project and run with
--debug
to see the arguments passed to the compiler and then copy them
👍 1
t
IR
Copy code
./gradlew build -Pkotlin.js.compiler=ir
Legacy
Copy code
./gradlew build -Pkotlin.js.compiler=legacy
j
That is Gradle. This person is using Make and the command-line compiler.
😞 1