Hi. How do I use the new IR compiler from the command-line?
natpryce
03/07/2023, 5:33 PM
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.
natpryce
03/07/2023, 5:34 PM
The Kotlin compilation is one recipe in a large Make build, and it is not practical to convert it to Gradle
j
jw
03/07/2023, 5:35 PM
-Xuse-ir
jw
03/07/2023, 5:36 PM
Wait i think that was for JVM. JS is like -Xir-produce-js
jw
03/07/2023, 5:37 PM
If you run with -X it'll tell you all the options
jw
03/07/2023, 5:37 PM
Or create a Gradle project and run with
--debug
to see the arguments passed to the compiler and then copy them
š 1
t
turansky
03/07/2023, 11:27 PM
IR
Copy code
./gradlew build -Pkotlin.js.compiler=ir
Legacy
Copy code
./gradlew build -Pkotlin.js.compiler=legacy
j
jw
03/08/2023, 12:48 AM
That is Gradle. This person is using Make and the command-line compiler.