Fix warnings in native modules
This commit is contained in:
@@ -160,7 +160,7 @@ class K2Native : CLICompiler<K2NativeCompilerArguments>() {
|
|||||||
|
|
||||||
arguments.outputName ?.let { put(OUTPUT, it) }
|
arguments.outputName ?.let { put(OUTPUT, it) }
|
||||||
val outputKind = CompilerOutputKind.valueOf(
|
val outputKind = CompilerOutputKind.valueOf(
|
||||||
(arguments.produce ?: "program").toUpperCase())
|
(arguments.produce ?: "program").uppercase())
|
||||||
put(PRODUCE, outputKind)
|
put(PRODUCE, outputKind)
|
||||||
put(METADATA_KLIB, arguments.metadataKlib)
|
put(METADATA_KLIB, arguments.metadataKlib)
|
||||||
|
|
||||||
@@ -370,7 +370,7 @@ private fun selectFrameworkType(
|
|||||||
configuration.report(
|
configuration.report(
|
||||||
STRONG_WARNING,
|
STRONG_WARNING,
|
||||||
"'$STATIC_FRAMEWORK_FLAG' is only supported when producing frameworks, " +
|
"'$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
|
false
|
||||||
} else {
|
} else {
|
||||||
@@ -421,7 +421,7 @@ private fun selectExportedLibraries(
|
|||||||
outputKind != CompilerOutputKind.STATIC && outputKind != CompilerOutputKind.DYNAMIC) {
|
outputKind != CompilerOutputKind.STATIC && outputKind != CompilerOutputKind.DYNAMIC) {
|
||||||
configuration.report(STRONG_WARNING,
|
configuration.report(STRONG_WARNING,
|
||||||
"-Xexport-library is only supported when producing frameworks or native libraries, " +
|
"-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()
|
emptyList()
|
||||||
} else {
|
} else {
|
||||||
@@ -439,7 +439,7 @@ private fun selectIncludes(
|
|||||||
return if (includes.isNotEmpty() && outputKind == CompilerOutputKind.LIBRARY) {
|
return if (includes.isNotEmpty() && outputKind == CompilerOutputKind.LIBRARY) {
|
||||||
configuration.report(
|
configuration.report(
|
||||||
ERROR,
|
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()
|
emptyList()
|
||||||
} else {
|
} else {
|
||||||
@@ -508,7 +508,7 @@ private fun parseShortModuleName(
|
|||||||
configuration.report(
|
configuration.report(
|
||||||
STRONG_WARNING,
|
STRONG_WARNING,
|
||||||
"$SHORT_MODULE_NAME_ARG is only supported when producing a Kotlin library, " +
|
"$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
|
null
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+1
-1
@@ -272,7 +272,7 @@ private fun getLibraryCacheDir(
|
|||||||
cacheKind: String
|
cacheKind: String
|
||||||
): File {
|
): File {
|
||||||
val cacheBaseName = CachedLibraries.getCachedLibraryName(libraryName)
|
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()
|
return OutputFiles(cacheDirectory.child(cacheBaseName).absolutePath, target, cacheOutputKind).mainFile.File()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user