diff --git a/build.gradle.kts b/build.gradle.kts index e19cf57d9e3..f3b2f1904c2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -380,6 +380,10 @@ val projectsWithDisabledFirBootstrap = coreLibProjects + listOf( ":wasm:wasm.ir" ) +val projectsWithEnabledContextReceivers = listOf( + ":compiler:fir:fir2ir" +) + val gradlePluginProjects = listOf( ":kotlin-gradle-plugin", ":kotlin-gradle-plugin-api", @@ -534,7 +538,8 @@ allprojects { kotlinOptions { freeCompilerArgs = commonCompilerArgs + jvmCompilerArgs - if (useJvmFir && this@allprojects.path !in projectsWithDisabledFirBootstrap) { + val moduleName = this@allprojects.path + if (useJvmFir && moduleName !in projectsWithDisabledFirBootstrap) { freeCompilerArgs += "-Xuse-fir" freeCompilerArgs += "-Xabi-stability=stable" if (useFirLT) { @@ -547,6 +552,11 @@ allprojects { if (renderDiagnosticNames) { freeCompilerArgs += "-Xrender-internal-diagnostic-names" } + + if (moduleName in projectsWithEnabledContextReceivers) { + freeCompilerArgs += "-Xcontext-receivers" + freeCompilerArgs += "-Xdont-poison-binaries-with-prerelease" + } } }