[Native] Warn on any usage of -repo CLI option

^KT-61098
This commit is contained in:
Dmitriy Dolovov
2023-11-16 12:24:44 +01:00
committed by Space Team
parent 0b253dc815
commit b1c9791404
4 changed files with 34 additions and 6 deletions
@@ -46,6 +46,15 @@ fun CompilerConfiguration.setupFromArguments(arguments: K2NativeCompilerArgument
put(INCLUDED_BINARY_FILES, arguments.includeBinaries.toNonNullList())
put(NATIVE_LIBRARY_FILES, arguments.nativeLibraries.toNonNullList())
if (arguments.repositories != null) {
// Show the warning also if `-repo` was really specified.
report(
WARNING,
"'-repo' ('-r') compiler option is deprecated and will be removed in one of the future releases. " +
"Please use library paths instead of library names in all compiler options such as '-library' ('-l')."
)
}
put(REPOSITORIES, arguments.repositories.toNonNullList())
// TODO: Collect all the explicit file names into an object