Fix KT-44295
builtins "header" is included in both builtin and posix platform libraries, but only posix has declarations for builtin structs (e.g. __va_list_tag). Library resolver by default has no guarantee on order of resolved libraries which causes KT-44295. To make results of `KotlinLibraryResolver` stable we pass TopologicalLibraryOrder to `getFullList` and specify a dependency of builtin on posix
This commit is contained in:
committed by
Vasily Levchenko
parent
0ecd76c3cb
commit
f6f050ff68
+2
-1
@@ -35,6 +35,7 @@ import org.jetbrains.kotlin.konan.target.KonanTarget
|
||||
import org.jetbrains.kotlin.konan.util.KonanHomeProvider
|
||||
import org.jetbrains.kotlin.library.KotlinLibrary
|
||||
import org.jetbrains.kotlin.library.packageFqName
|
||||
import org.jetbrains.kotlin.library.resolver.TopologicalLibraryOrder
|
||||
import org.jetbrains.kotlin.library.resolver.impl.KotlinLibraryResolverImpl
|
||||
import org.jetbrains.kotlin.library.resolver.impl.libraryResolver
|
||||
import org.jetbrains.kotlin.library.toUnresolvedLibraries
|
||||
@@ -430,7 +431,7 @@ private fun resolveDependencies(
|
||||
noStdLib = false,
|
||||
noDefaultLibs = noDefaultLibs,
|
||||
noEndorsedLibs = noEndorsedLibs
|
||||
).getFullList()
|
||||
).getFullList(TopologicalLibraryOrder)
|
||||
}
|
||||
|
||||
internal fun prepareTool(target: String?, flavor: KotlinPlatform): ToolConfig {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
depends = posix
|
||||
package = platform.builtin
|
||||
headerFilter =
|
||||
language = C
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
depends = posix
|
||||
package = platform.builtin
|
||||
headerFilter =
|
||||
language = C
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
depends = posix
|
||||
package = platform.builtin
|
||||
headerFilter =
|
||||
language = C
|
||||
|
||||
Reference in New Issue
Block a user