Return old behaviour for cinterop -output argument suffix handling
(accidentally changed in 976a9fc1) #KT-44824 Fixed.
This commit is contained in:
committed by
Vasily Levchenko
parent
3f15774cb2
commit
bea8edb10c
+10
-2
@@ -40,6 +40,7 @@ import org.jetbrains.kotlin.library.resolver.impl.KotlinLibraryResolverImpl
|
|||||||
import org.jetbrains.kotlin.library.resolver.impl.libraryResolver
|
import org.jetbrains.kotlin.library.resolver.impl.libraryResolver
|
||||||
import org.jetbrains.kotlin.library.toUnresolvedLibraries
|
import org.jetbrains.kotlin.library.toUnresolvedLibraries
|
||||||
import org.jetbrains.kotlin.util.removeSuffixIfPresent
|
import org.jetbrains.kotlin.util.removeSuffixIfPresent
|
||||||
|
import org.jetbrains.kotlin.util.suffixIfNot
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.lang.IllegalArgumentException
|
import java.lang.IllegalArgumentException
|
||||||
import java.nio.file.*
|
import java.nio.file.*
|
||||||
@@ -376,15 +377,22 @@ private fun processCLib(flavor: KotlinPlatform, cinteropArguments: CInteropArgum
|
|||||||
noDefaultLibs = true,
|
noDefaultLibs = true,
|
||||||
noEndorsedLibs = true
|
noEndorsedLibs = true
|
||||||
).getFullList()
|
).getFullList()
|
||||||
|
|
||||||
|
val nopack = cinteropArguments.nopack
|
||||||
|
val outputPath = cinteropArguments.output.let {
|
||||||
|
val suffix = CompilerOutputKind.LIBRARY.suffix(tool.target)
|
||||||
|
if (nopack) it.removeSuffixIfPresent(suffix) else it.suffixIfNot(suffix)
|
||||||
|
}
|
||||||
|
|
||||||
createInteropLibrary(
|
createInteropLibrary(
|
||||||
metadata = stubIrOutput.metadata,
|
metadata = stubIrOutput.metadata,
|
||||||
nativeBitcodeFiles = compiledFiles + nativeOutputPath,
|
nativeBitcodeFiles = compiledFiles + nativeOutputPath,
|
||||||
target = tool.target,
|
target = tool.target,
|
||||||
moduleName = moduleName,
|
moduleName = moduleName,
|
||||||
outputPath = cinteropArguments.output,
|
outputPath = outputPath,
|
||||||
manifest = def.manifestAddendProperties,
|
manifest = def.manifestAddendProperties,
|
||||||
dependencies = stdlibDependency + imports.requiredLibraries.toList(),
|
dependencies = stdlibDependency + imports.requiredLibraries.toList(),
|
||||||
nopack = cinteropArguments.nopack,
|
nopack = nopack,
|
||||||
shortName = cinteropArguments.shortModuleName,
|
shortName = cinteropArguments.shortModuleName,
|
||||||
staticLibraries = resolveLibraries(staticLibraries, libraryPaths)
|
staticLibraries = resolveLibraries(staticLibraries, libraryPaths)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user