Fix warnings in native modules
This commit is contained in:
@@ -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 {
|
||||
|
||||
+1
-1
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user