-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support the new Kotlin IR backend #384
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
@@ -342,6 +342,12 @@ def _kotlinc_options_provider_to_flags(opts): | |||
flags.append("-nowarn") | |||
if opts.x_use_experimental: | |||
flags.append("-Xuse-experimental=kotlin.Experimental") | |||
if opts.x_use_ir: | |||
flags.append("-Xuse-ir") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's it? We don't need extra libs or some such?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The extra libs that are needed can be provided via compiler plugins
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For IR or compose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For compose. The new IR backend is just the new compiler backend that Jetbrains has been working on. Jetpack Compose is a compiler plugin that was built to leverage the new backend (enabled via -Xplugin=...
or kt_compiler_plugin(...)
.
In order to support Jetpack Compose we need to support enabling the experimental IR backend.
Compose setup examples: https://developer.android.com/jetpack/androidx/releases/compose#declaring_dependencies
Docs for the new IR backend: https://kotlinlang.org/docs/reference/whatsnew14.html#new-jvm-ir-backend