[K2/N] Run new stdlib tests also for K2.

Merge-request: KT-MR-8708
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
This commit is contained in:
Vladimir Sukharev
2023-02-10 10:34:44 +00:00
committed by Space Team
parent f86d28449f
commit 6e434748d1
4 changed files with 86 additions and 3 deletions
@@ -14,9 +14,9 @@ import org.jetbrains.kotlin.konan.file.File
import org.jetbrains.kotlin.konan.target.CompilerOutputKind
fun CompilerConfiguration.setupFromArguments(arguments: K2NativeCompilerArguments) = with(KonanConfigKeys) {
val commonSources = arguments.commonSources?.toSet().orEmpty()
val commonSources = arguments.commonSources?.toSet().orEmpty().map { it.absoluteNormalizedFile() }
arguments.freeArgs.forEach {
addKotlinSourceRoot(it, it in commonSources)
addKotlinSourceRoot(it, it.absoluteNormalizedFile() in commonSources)
}
// Can be overwritten by explicit arguments below.
@@ -253,6 +253,8 @@ fun CompilerConfiguration.setupFromArguments(arguments: K2NativeCompilerArgument
putIfNotNull(SAVE_LLVM_IR_DIRECTORY, arguments.saveLlvmIrDirectory)
}
private fun String.absoluteNormalizedFile() = java.io.File(this).absoluteFile.normalize()
internal fun CompilerConfiguration.setupCommonOptionsForCaches(konanConfig: KonanConfig) = with(KonanConfigKeys) {
put(TARGET, konanConfig.target.toString())
put(DEBUG, konanConfig.debug)