Do not save temporary files by default
This commit is contained in:
committed by
Sergey Bogolepov
parent
049d29af75
commit
1be56f1e51
@@ -19,6 +19,7 @@ package org.jetbrains.kotlin.cli.utilities
|
||||
import org.jetbrains.kotlin.backend.konan.library.defaultResolver
|
||||
import org.jetbrains.kotlin.backend.konan.library.impl.KonanLibrary
|
||||
import org.jetbrains.kotlin.backend.konan.library.resolveLibrariesRecursive
|
||||
import org.jetbrains.kotlin.konan.TempFiles
|
||||
import org.jetbrains.kotlin.konan.file.File
|
||||
import org.jetbrains.kotlin.konan.properties.loadProperties
|
||||
import org.jetbrains.kotlin.konan.target.PlatformManager
|
||||
@@ -40,6 +41,7 @@ fun invokeInterop(flavor: String, args: Array<String>): Array<String> {
|
||||
val repos = mutableListOf<String>()
|
||||
var noDefaultLibs = false
|
||||
var purgeUserLibs = false
|
||||
var temporaryFilesDir = ""
|
||||
for (i in args.indices) {
|
||||
val arg = args[i]
|
||||
val nextArg = args.getOrNull(i + 1)
|
||||
@@ -55,6 +57,8 @@ fun invokeInterop(flavor: String, args: Array<String>): Array<String> {
|
||||
noDefaultLibs = true
|
||||
if (arg == PURGE_USER_LIBS)
|
||||
purgeUserLibs = true
|
||||
if (arg == "--temporary_files_dir")
|
||||
temporaryFilesDir = nextArg ?: ""
|
||||
}
|
||||
|
||||
|
||||
@@ -82,17 +86,18 @@ fun invokeInterop(flavor: String, args: Array<String>): Array<String> {
|
||||
} ?: emptyList()
|
||||
}
|
||||
|
||||
val additionalArgs = listOf<String>(
|
||||
val additionalArgs = listOf(
|
||||
"-generated", generatedDir.path,
|
||||
"-natives", nativesDir.path,
|
||||
"-cstubsname", cstubsName,
|
||||
"-manifest", manifest.path,
|
||||
"-flavor", flavor
|
||||
"-flavor", flavor,
|
||||
"-temporaryFilesDir", temporaryFilesDir
|
||||
) + importArgs
|
||||
|
||||
val cinteropArgs = (additionalArgs + args.filter { it !in cinteropArgFilter }).toTypedArray()
|
||||
|
||||
val cinteropArgsToCompiler = interop(flavor, cinteropArgs) ?: emptyArray<String>()
|
||||
val cinteropArgsToCompiler = interop(flavor, cinteropArgs) ?: emptyArray()
|
||||
|
||||
val nativeStubs =
|
||||
if (flavor == "wasm")
|
||||
@@ -105,7 +110,8 @@ fun invokeInterop(flavor: String, args: Array<String>): Array<String> {
|
||||
"-produce", "library",
|
||||
"-o", outputFileName,
|
||||
"-target", target.visibleName,
|
||||
"-manifest", manifest.path) +
|
||||
"-manifest", manifest.path,
|
||||
"--temporary_files_dir", temporaryFilesDir) +
|
||||
nativeStubs +
|
||||
cinteropArgsToCompiler +
|
||||
libraries.flatMap { listOf("-library", it) } +
|
||||
|
||||
Reference in New Issue
Block a user