Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

K/N: can't define cinterop in a benchmark module #190

Open
fzhinkin opened this issue Feb 15, 2024 · 0 comments
Open

K/N: can't define cinterop in a benchmark module #190

fzhinkin opened this issue Feb 15, 2024 · 0 comments

Comments

@fzhinkin
Copy link
Contributor

Benchmark compilation fails when a module has cinterop configuration for a native target.

Here's an example project: https://github.com/fzhinkin/kotlinx-benchmark-cinterop-issue/blob/main/build.gradle.kts

Compilation fails with:

> Task :compileMacosArm64BenchmarkKotlinMacosArm64 FAILED
e: Could not find "org.example:kotlinx-benchmark-cinterop-issue-cinterop-nativeCalls" in [/XXX/Development/kotlinx-benchmark-cinterop-issue, /XXX/.konan/klib, /XXX/.konan/kotlin-native-prebuilt-macos-aarch64-1.9.22/klib/common, /XXX/.konan/kotlin-native-prebuilt-macos-aarch64-1.9.22/klib/platform/macos_arm64]

Sometimes, a good reference for benchmarking is some native library, so it would be nice to support cinterop for benchmark modules (or at least, explicitly warn that it's unsupported).

The workaround is to declare a separate module with cinterop and depend on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant