Fix warnings in native modules

This commit is contained in:
Alexander Udalov
2021-08-03 21:19:23 +02:00
parent 45ffe58b9c
commit c821aba3bd
2 changed files with 6 additions and 6 deletions
@@ -160,7 +160,7 @@ class K2Native : CLICompiler<K2NativeCompilerArguments>() {
arguments.outputName ?.let { put(OUTPUT, it) }
val outputKind = CompilerOutputKind.valueOf(
(arguments.produce ?: "program").toUpperCase())
(arguments.produce ?: "program").uppercase())
put(PRODUCE, outputKind)
put(METADATA_KLIB, arguments.metadataKlib)
@@ -370,7 +370,7 @@ private fun selectFrameworkType(
configuration.report(
STRONG_WARNING,
"'$STATIC_FRAMEWORK_FLAG' is only supported when producing frameworks, " +
"but the compiler is producing ${outputKind.name.toLowerCase()}"
"but the compiler is producing ${outputKind.name.lowercase()}"
)
false
} else {
@@ -421,7 +421,7 @@ private fun selectExportedLibraries(
outputKind != CompilerOutputKind.STATIC && outputKind != CompilerOutputKind.DYNAMIC) {
configuration.report(STRONG_WARNING,
"-Xexport-library is only supported when producing frameworks or native libraries, " +
"but the compiler is producing ${outputKind.name.toLowerCase()}")
"but the compiler is producing ${outputKind.name.lowercase()}")
emptyList()
} else {
@@ -439,7 +439,7 @@ private fun selectIncludes(
return if (includes.isNotEmpty() && outputKind == CompilerOutputKind.LIBRARY) {
configuration.report(
ERROR,
"The $INCLUDE_ARG flag is not supported when producing ${outputKind.name.toLowerCase()}"
"The $INCLUDE_ARG flag is not supported when producing ${outputKind.name.lowercase()}"
)
emptyList()
} else {
@@ -508,7 +508,7 @@ private fun parseShortModuleName(
configuration.report(
STRONG_WARNING,
"$SHORT_MODULE_NAME_ARG is only supported when producing a Kotlin library, " +
"but the compiler is producing ${outputKind.name.toLowerCase()}"
"but the compiler is producing ${outputKind.name.lowercase()}"
)
null
} else {
@@ -272,7 +272,7 @@ private fun getLibraryCacheDir(
cacheKind: String
): File {
val cacheBaseName = CachedLibraries.getCachedLibraryName(libraryName)
val cacheOutputKind = CompilerOutputKind.valueOf(cacheKind.toUpperCase())
val cacheOutputKind = CompilerOutputKind.valueOf(cacheKind.uppercase())
return OutputFiles(cacheDirectory.child(cacheBaseName).absolutePath, target, cacheOutputKind).mainFile.File()
}