Native: don't add ExperimentalForeignApi to platform libs
Use -Xdisable-experimental-annotation when generating platform libs. As a result, unlike all other cinterop libraries, declarations in platform libs won't require ExperimentalForeignApi opt-in ^KT-58362
This commit is contained in:
committed by
Space Team
parent
cabb25d3e0
commit
7ca0cb1077
@@ -72,7 +72,7 @@ konanTargetList.forEach { target ->
|
||||
libraries {
|
||||
klibs(df.config.depends.map { "${fileNamePrefix}${it}" })
|
||||
}
|
||||
extraOpts("-Xpurge-user-libs", "-Xshort-module-name", df.name)
|
||||
extraOpts("-Xpurge-user-libs", "-Xshort-module-name", df.name, "-Xdisable-experimental-annotation")
|
||||
compilerOpts("-fmodules-cache-path=${project.buildDir}/clangModulesCache")
|
||||
}
|
||||
}
|
||||
|
||||
+1
@@ -270,6 +270,7 @@ private fun generateLibrary(
|
||||
"-compiler-option", "-fmodules-cache-path=${tmpDirectory.child("clangModulesCache").absolutePath}",
|
||||
"-repo", outputDirectory.absolutePath,
|
||||
"-no-default-libs", "-no-endorsed-libs", "-Xpurge-user-libs", "-nopack",
|
||||
"-Xdisable-experimental-annotation",
|
||||
*cinteropOptions.additionalArguments.toTypedArray(),
|
||||
"-$SHORT_MODULE_NAME", def.shortLibraryName,
|
||||
*def.depends.flatMap { listOf("-l", "$outputDirectory/${it.libraryName}") }.toTypedArray()
|
||||
|
||||
Reference in New Issue
Block a user