diff --git a/build.gradle.kts b/build.gradle.kts index 26785d5a1d9..31b6ad6eba5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -123,8 +123,8 @@ if (!project.hasProperty("versions.kotlin-native")) { extra["versions.kotlin-native"] = "1.7.0-dev-1827" } - val useJvmFir by extra(project.kotlinBuildProperties.useFir) +val renderDiagnosticNames by extra(project.kotlinBuildProperties.renderDiagnosticNames) val irCompilerModules = arrayOf( ":compiler:ir.tree", @@ -501,6 +501,9 @@ allprojects { freeCompilerArgs += "-Xuse-fir" freeCompilerArgs += "-Xabi-stability=stable" } + if (renderDiagnosticNames) { + freeCompilerArgs += "-Xrender-internal-diagnostic-names" + } } } diff --git a/gradle.properties b/gradle.properties index a999aa93075..b2b9a25958e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -62,6 +62,9 @@ org.gradle.vfs.watch=true # Disable -Werror compiler flag #kotlin.build.disable.werror=true +# Render internal diagostic names +#kotlin.build.render.diagnostic.names=true + # Enable bootstrap from local build of compiler (build from ./gradlew publish) #bootstrap.local=true # By default bootstrap compiler is located in ./build/repo directory diff --git a/libraries/commonConfiguration.gradle b/libraries/commonConfiguration.gradle index 536ded6caf7..2427cf94ea5 100644 --- a/libraries/commonConfiguration.gradle +++ b/libraries/commonConfiguration.gradle @@ -70,6 +70,9 @@ ext.configureFrontendIr = { Project project -> if (project.kotlinBuildProperties.useFirForLibraries) { freeCompilerArgs += "-Xuse-fir" } + if (project.properties.renderDiagnosticNames) { + freeCompilerArgs += "-Xrender-internal-diagnostic-names" + } } } }