diff --git a/native/native.tests/tests/org/jetbrains/kotlin/konan/test/blackbox/NativeSimpleTestUtils.kt b/native/native.tests/tests/org/jetbrains/kotlin/konan/test/blackbox/NativeSimpleTestUtils.kt index adbde2aacf4..00c057af879 100644 --- a/native/native.tests/tests/org/jetbrains/kotlin/konan/test/blackbox/NativeSimpleTestUtils.kt +++ b/native/native.tests/tests/org/jetbrains/kotlin/konan/test/blackbox/NativeSimpleTestUtils.kt @@ -146,6 +146,7 @@ internal fun AbstractNativeSimpleTest.cinteropToLibrary( targets = targets, freeCompilerArgs = freeCompilerArgs, defFile = testCase.modules.single().files.single().location, + dependencies = emptyList(), expectedArtifact = getLibraryArtifact(testCase, outputDir) ).result } diff --git a/native/native.tests/tests/org/jetbrains/kotlin/konan/test/blackbox/support/compilation/TestCompilation.kt b/native/native.tests/tests/org/jetbrains/kotlin/konan/test/blackbox/support/compilation/TestCompilation.kt index 50d7de29ea4..cccae13cb0c 100644 --- a/native/native.tests/tests/org/jetbrains/kotlin/konan/test/blackbox/support/compilation/TestCompilation.kt +++ b/native/native.tests/tests/org/jetbrains/kotlin/konan/test/blackbox/support/compilation/TestCompilation.kt @@ -323,11 +323,16 @@ internal class CInteropCompilation( freeCompilerArgs: TestCompilerArgs, defFile: File, sources: List = emptyList(), + dependencies: Iterable>, expectedArtifact: KLIB ) : TestCompilation() { override val result: TestCompilationResult by lazy { val extraArgsArray = buildList { + dependencies.forEach { + add("-l") + add(it.artifact.path) + } addAll(freeCompilerArgs.cinteropArgs) sources.forEach { add("-Xcompile-source") diff --git a/native/native.tests/tests/org/jetbrains/kotlin/konan/test/blackbox/support/compilation/TestCompilationFactory.kt b/native/native.tests/tests/org/jetbrains/kotlin/konan/test/blackbox/support/compilation/TestCompilationFactory.kt index 9d2f5d5312f..4344145933f 100644 --- a/native/native.tests/tests/org/jetbrains/kotlin/konan/test/blackbox/support/compilation/TestCompilationFactory.kt +++ b/native/native.tests/tests/org/jetbrains/kotlin/konan/test/blackbox/support/compilation/TestCompilationFactory.kt @@ -252,6 +252,7 @@ internal class TestCompilationFactory { freeCompilerArgs = freeCompilerArgs, defFile = defFile, sources = cSourceFiles, + dependencies = dependencies.forKlib(), expectedArtifact = klibArtifact ) to false // CInterop klib cannot be compiled into per-file cache }