Native stdlib build: fix using OptionalExpectation in Interop/Runtime
Current build for kotlin-native/Interop/Runtime sources is not truly MPP, so explicit -Xcommon-sources flags are required for the compiler to allow using OptionalExpectation annotations.
This commit is contained in:
committed by
Space
parent
03df752e8e
commit
b45de517c4
@@ -215,8 +215,10 @@ task stdlib(dependsOn: "${hostName}Stdlib")
|
|||||||
|
|
||||||
def commonSrc = project(":kotlin-stdlib-common").files("src/kotlin", "src/generated", "../unsigned/src", "../src").files
|
def commonSrc = project(":kotlin-stdlib-common").files("src/kotlin", "src/generated", "../unsigned/src", "../src").files
|
||||||
|
|
||||||
|
def interopRuntimeCommonSrc = project(':kotlin-native:Interop:Runtime').file('src/main/kotlin')
|
||||||
|
|
||||||
final List<File> stdLibSrc = [
|
final List<File> stdLibSrc = [
|
||||||
project(':kotlin-native:Interop:Runtime').file('src/main/kotlin'),
|
interopRuntimeCommonSrc,
|
||||||
project(':kotlin-native:Interop:Runtime').file('src/native/kotlin'),
|
project(':kotlin-native:Interop:Runtime').file('src/native/kotlin'),
|
||||||
project(':kotlin-native:Interop:JsRuntime').file('src/main/kotlin'),
|
project(':kotlin-native:Interop:JsRuntime').file('src/main/kotlin'),
|
||||||
project(':kotlin-native:runtime').file('src/main/kotlin')
|
project(':kotlin-native:runtime').file('src/main/kotlin')
|
||||||
@@ -260,6 +262,7 @@ targetList.each { target ->
|
|||||||
"-Xcommon-sources=${commonSrc.join(',')}",
|
"-Xcommon-sources=${commonSrc.join(',')}",
|
||||||
"-Xcommon-sources=${testAnnotationCommon.join(',')}",
|
"-Xcommon-sources=${testAnnotationCommon.join(',')}",
|
||||||
"-Xcommon-sources=${testCommon.join(',')}",
|
"-Xcommon-sources=${testCommon.join(',')}",
|
||||||
|
"-Xcommon-sources=$interopRuntimeCommonSrc",
|
||||||
*stdLibSrc]
|
*stdLibSrc]
|
||||||
stdLibSrc.forEach { inputs.dir(it) }
|
stdLibSrc.forEach { inputs.dir(it) }
|
||||||
commonSrc.forEach{
|
commonSrc.forEach{
|
||||||
|
|||||||
Reference in New Issue
Block a user