Change FileCollection to List<File> for K/N argument builder.
This commit is contained in:
committed by
TeamCityServer
parent
f12a010fc8
commit
bbc43cde74
+6
-8
@@ -77,9 +77,8 @@ internal fun buildKotlinNativeBinaryLinkerArgs(
|
|||||||
target: KonanTarget,
|
target: KonanTarget,
|
||||||
outputKind: CompilerOutputKind,
|
outputKind: CompilerOutputKind,
|
||||||
libraries: List<File>,
|
libraries: List<File>,
|
||||||
friendModule: FileCollection,
|
friendModules: List<File>,
|
||||||
|
|
||||||
languageSettings: LanguageSettings,
|
|
||||||
enableEndorsedLibs: Boolean,
|
enableEndorsedLibs: Boolean,
|
||||||
kotlinOptions: KotlinCommonToolOptions,
|
kotlinOptions: KotlinCommonToolOptions,
|
||||||
compilerPlugins: List<CompilerPluginData>,
|
compilerPlugins: List<CompilerPluginData>,
|
||||||
@@ -108,14 +107,13 @@ internal fun buildKotlinNativeBinaryLinkerArgs(
|
|||||||
binaryOptions.forEach { (name, value) -> add("-Xbinary=$name=$value") }
|
binaryOptions.forEach { (name, value) -> add("-Xbinary=$name=$value") }
|
||||||
addKey("-Xstatic-framework", isStaticFramework)
|
addKey("-Xstatic-framework", isStaticFramework)
|
||||||
|
|
||||||
addAll(buildKotlinNativeCommonArgs(languageSettings, enableEndorsedLibs, kotlinOptions, compilerPlugins))
|
addAll(buildKotlinNativeCommonArgs(null, enableEndorsedLibs, kotlinOptions, compilerPlugins))
|
||||||
|
|
||||||
exportLibraries.forEach { add("-Xexport-library=${it.absolutePath}") }
|
exportLibraries.forEach { add("-Xexport-library=${it.absolutePath}") }
|
||||||
includeLibraries.forEach { add("-Xinclude=${it.absolutePath}") }
|
includeLibraries.forEach { add("-Xinclude=${it.absolutePath}") }
|
||||||
|
|
||||||
val friends = friendModule.files
|
if (friendModules.isNotEmpty()) {
|
||||||
if (friends.isNotEmpty()) {
|
addArg("-friend-modules", friendModules.joinToString(File.pathSeparator) { it.absolutePath })
|
||||||
addArg("-friend-modules", friends.joinToString(File.pathSeparator) { it.absolutePath })
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,7 +135,7 @@ private fun buildKotlinNativeMainArgs(
|
|||||||
}
|
}
|
||||||
|
|
||||||
internal fun buildKotlinNativeCommonArgs(
|
internal fun buildKotlinNativeCommonArgs(
|
||||||
languageSettings: LanguageSettings,
|
languageSettings: LanguageSettings?, //null for linking
|
||||||
enableEndorsedLibs: Boolean,
|
enableEndorsedLibs: Boolean,
|
||||||
kotlinOptions: KotlinCommonToolOptions,
|
kotlinOptions: KotlinCommonToolOptions,
|
||||||
compilerPlugins: List<CompilerPluginData>
|
compilerPlugins: List<CompilerPluginData>
|
||||||
@@ -150,7 +148,7 @@ internal fun buildKotlinNativeCommonArgs(
|
|||||||
addArgs("-P", plugin.options.arguments)
|
addArgs("-P", plugin.options.arguments)
|
||||||
}
|
}
|
||||||
|
|
||||||
with(languageSettings) {
|
languageSettings?.run {
|
||||||
addArgIfNotNull("-language-version", languageVersion)
|
addArgIfNotNull("-language-version", languageVersion)
|
||||||
addArgIfNotNull("-api-version", apiVersion)
|
addArgIfNotNull("-api-version", apiVersion)
|
||||||
addKey("-progressive", progressiveMode)
|
addKey("-progressive", progressiveMode)
|
||||||
|
|||||||
+1
-2
@@ -635,8 +635,7 @@ constructor(
|
|||||||
konanTarget,
|
konanTarget,
|
||||||
outputKind,
|
outputKind,
|
||||||
libraries.files.filterKlibsPassedToCompiler(),
|
libraries.files.filterKlibsPassedToCompiler(),
|
||||||
friendModule,
|
friendModule.files.toList(),
|
||||||
languageSettings,
|
|
||||||
enableEndorsedLibs,
|
enableEndorsedLibs,
|
||||||
localKotlinOptions,
|
localKotlinOptions,
|
||||||
plugins,
|
plugins,
|
||||||
|
|||||||
Reference in New Issue
Block a user