[Gradle] Disable stdlib for Kotlin Native Compile and Link tasks
^KT-61559 Verification Pending
This commit is contained in:
committed by
Space Team
parent
4a0bfcd842
commit
721aafc94c
+1
@@ -240,6 +240,7 @@ constructor(
|
|||||||
args.multiPlatform = true
|
args.multiPlatform = true
|
||||||
args.noendorsedlibs = true
|
args.noendorsedlibs = true
|
||||||
args.nodefaultlibs = true
|
args.nodefaultlibs = true
|
||||||
|
args.nostdlib = true
|
||||||
args.pluginOptions = compilerPlugins.flatMap { it.options.arguments }.toTypedArray()
|
args.pluginOptions = compilerPlugins.flatMap { it.options.arguments }.toTypedArray()
|
||||||
args.generateTestRunner = processTests
|
args.generateTestRunner = processTests
|
||||||
args.mainPackage = entryPoint
|
args.mainPackage = entryPoint
|
||||||
|
|||||||
+1
@@ -453,6 +453,7 @@ internal constructor(
|
|||||||
args.produce = outputKind.name.toLowerCaseAsciiOnly()
|
args.produce = outputKind.name.toLowerCaseAsciiOnly()
|
||||||
args.metadataKlib = sharedCompilationData != null
|
args.metadataKlib = sharedCompilationData != null
|
||||||
args.nodefaultlibs = true
|
args.nodefaultlibs = true
|
||||||
|
args.nostdlib = true
|
||||||
args.manifestFile = sharedCompilationData?.manifestFile?.absolutePath
|
args.manifestFile = sharedCompilationData?.manifestFile?.absolutePath
|
||||||
args.nopack = produceUnpackedKlib.get()
|
args.nopack = produceUnpackedKlib.get()
|
||||||
|
|
||||||
|
|||||||
+4
-2
@@ -200,7 +200,7 @@ class KotlinNativeCompileArgumentsTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `native compilation dependency files should contain native platform dependencies`() {
|
fun `native compilation dependency files should contain native platform dependencies and stdlib`() {
|
||||||
val project = buildProjectWithMPP()
|
val project = buildProjectWithMPP()
|
||||||
project.repositories.mavenLocal()
|
project.repositories.mavenLocal()
|
||||||
project.repositories.mavenCentralCacheRedirector()
|
project.repositories.mavenCentralCacheRedirector()
|
||||||
@@ -211,10 +211,12 @@ class KotlinNativeCompileArgumentsTest {
|
|||||||
project.evaluate()
|
project.evaluate()
|
||||||
val nativeCompilation = kotlin.linuxX64().compilations.main
|
val nativeCompilation = kotlin.linuxX64().compilations.main
|
||||||
|
|
||||||
val expectedDependencies = listOf("iconv", "posix", "zlib", "linux", "builtin").map {
|
val expectedPlatformDependencies = listOf("iconv", "posix", "zlib", "linux", "builtin").map {
|
||||||
"org.jetbrains.kotlin.native.platform.$it"
|
"org.jetbrains.kotlin.native.platform.$it"
|
||||||
}.toSet()
|
}.toSet()
|
||||||
|
|
||||||
|
val expectedDependencies = expectedPlatformDependencies + listOf("stdlib")
|
||||||
|
|
||||||
val actualDependencies = nativeCompilation.compileDependencyFiles
|
val actualDependencies = nativeCompilation.compileDependencyFiles
|
||||||
.map { it.name }
|
.map { it.name }
|
||||||
.toSet()
|
.toSet()
|
||||||
|
|||||||
Reference in New Issue
Block a user