Use -Xallow-kotlin-package while compiling common sources
K2MetadataCompiler doesn't perform explicit check of compilation of
'kotlin' package, thus stdlib build wasn't passing '-Xallow-kotlin-package'.
However, we have special hack for compiling stdlib with contracts: if
'-Xallow-kotlin-package' is passed, then allow compiling contracts for
custom functions. We have to do it this way, because we don't want
stdlib artifacts to be marked with pre-release flag, even though
contracts for custom functions are not enabled yet
(see eae9923dbe).
Therefore, it's crucial to pass -Xallow-kotlin-package properly for that
side-effect.
This commit is contained in:
@@ -57,7 +57,8 @@ compileKotlinCommon {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs = [
|
||||
"-module-name", project.name,
|
||||
"-Xuse-experimental=kotlin.Experimental"
|
||||
"-Xuse-experimental=kotlin.Experimental",
|
||||
"-Xallow-kotlin-package"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -69,7 +70,8 @@ compileUnsignedKotlinCommon {
|
||||
freeCompilerArgs += [
|
||||
"-Xuse-experimental=kotlin.Experimental",
|
||||
"-Xuse-experimental=kotlin.ExperimentalUnsignedTypes",
|
||||
"-XXLanguage:+InlineClasses"
|
||||
"-XXLanguage:+InlineClasses",
|
||||
"-Xallow-kotlin-package"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user