[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.noendorsedlibs = true
|
||||
args.nodefaultlibs = true
|
||||
args.nostdlib = true
|
||||
args.pluginOptions = compilerPlugins.flatMap { it.options.arguments }.toTypedArray()
|
||||
args.generateTestRunner = processTests
|
||||
args.mainPackage = entryPoint
|
||||
|
||||
+1
@@ -453,6 +453,7 @@ internal constructor(
|
||||
args.produce = outputKind.name.toLowerCaseAsciiOnly()
|
||||
args.metadataKlib = sharedCompilationData != null
|
||||
args.nodefaultlibs = true
|
||||
args.nostdlib = true
|
||||
args.manifestFile = sharedCompilationData?.manifestFile?.absolutePath
|
||||
args.nopack = produceUnpackedKlib.get()
|
||||
|
||||
|
||||
+4
-2
@@ -200,7 +200,7 @@ class KotlinNativeCompileArgumentsTest {
|
||||
}
|
||||
|
||||
@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()
|
||||
project.repositories.mavenLocal()
|
||||
project.repositories.mavenCentralCacheRedirector()
|
||||
@@ -211,10 +211,12 @@ class KotlinNativeCompileArgumentsTest {
|
||||
project.evaluate()
|
||||
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"
|
||||
}.toSet()
|
||||
|
||||
val expectedDependencies = expectedPlatformDependencies + listOf("stdlib")
|
||||
|
||||
val actualDependencies = nativeCompilation.compileDependencyFiles
|
||||
.map { it.name }
|
||||
.toSet()
|
||||
|
||||
Reference in New Issue
Block a user