[JS IR] Pass friend dependencies to compiler in test runner
This commit is contained in:
committed by
teamcityserver
parent
5d2739e6f0
commit
9138425a3d
@@ -220,11 +220,16 @@ abstract class BasicIrBoxTest(
|
||||
val runtimeKlibs = if (needsFullIrRuntime) listOf(fullRuntimeKlib, kotlinTestKLib) else listOf(defaultRuntimeKlib)
|
||||
|
||||
val transitiveLibraries = config.configuration[JSConfigurationKeys.TRANSITIVE_LIBRARIES]!!.map { File(it).name }
|
||||
val friendsLibraries = (config.configuration[JSConfigurationKeys.FRIEND_PATHS] ?: emptyList()).map { File(it).name }
|
||||
|
||||
val allKlibPaths = (runtimeKlibs + transitiveLibraries.map {
|
||||
compilationCache[it] ?: error("Can't find compiled module for dependency $it")
|
||||
}).map { File(it).absolutePath }.toMutableList()
|
||||
|
||||
val friendPaths = friendsLibraries.map { compilationCache[it] ?: error("Can't find compiled module for friend dep $it") }.map {
|
||||
File(it).canonicalPath
|
||||
}
|
||||
|
||||
val klibPath = outputFile.canonicalPath.replace("_v5.js", "")
|
||||
|
||||
val actualOutputFile = outputFile.canonicalPath.let {
|
||||
@@ -241,7 +246,7 @@ abstract class BasicIrBoxTest(
|
||||
filesToCompile,
|
||||
config.configuration,
|
||||
allKlibPaths,
|
||||
emptyList(),
|
||||
friendPaths,
|
||||
AnalyzerWithCompilerReport(config.configuration),
|
||||
)
|
||||
generateKLib(
|
||||
@@ -288,7 +293,7 @@ abstract class BasicIrBoxTest(
|
||||
MainModule.Klib(klibPath),
|
||||
config.configuration,
|
||||
allKlibPaths + klibCannonPath,
|
||||
emptyList(),
|
||||
friendPaths,
|
||||
icUseGlobalSignatures = runIcMode,
|
||||
icUseStdlibCache = runIcMode,
|
||||
icCache = emptyMap()
|
||||
|
||||
Reference in New Issue
Block a user