Skip to content

build: use indirect ccall mode in multik-openblas cinterop#320

Merged
devcrocod merged 1 commit intodevelopfrom
build/cinterop-indirect-ccall
Apr 21, 2026
Merged

build: use indirect ccall mode in multik-openblas cinterop#320
devcrocod merged 1 commit intodevelopfrom
build/cinterop-indirect-ccall

Conversation

@devcrocod
Copy link
Copy Markdown
Collaborator

Summary

  • Add extraOpts("-Xccall-mode", "indirect") to the host-target cinterop block in multik-openblas.
  • -Xccall-mode indirect switches Kotlin/Native C-call generation to indirect dispatch (function-pointer lookup) instead of the direct ccall mode. This decouples the Kotlin/Native consumer from direct link-time symbol resolution against OpenBLAS and the multik_jni C++ sources — resolution happens at runtime.

Test plan

  • ./gradlew :multik-openblas:compileKotlinMacosArm64 — BUILD SUCCESSFUL on macOS ARM64 host.
  • ./gradlew assemble — BUILD SUCCESSFUL.
  • Verify on Linux CI runner (./gradlew :multik-openblas:compileKotlinLinuxX64 with -Pmultik.mainHost=false).

Copilot AI review requested due to automatic review settings April 21, 2026 20:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the multik-openblas Kotlin/Native cinterop configuration to use indirect C-call dispatch, aiming to reduce link-time coupling to OpenBLAS / native symbols by deferring resolution to runtime.

Changes:

  • Add extraOpts("-Xccall-mode", "indirect") to the host-target libmultik cinterop configuration in multik-openblas.

@devcrocod devcrocod force-pushed the build/cinterop-indirect-ccall branch from f1eae23 to 26d9f49 Compare April 21, 2026 20:53
@devcrocod devcrocod merged commit 0b3a964 into develop Apr 21, 2026
2 checks passed
@devcrocod devcrocod deleted the build/cinterop-indirect-ccall branch April 21, 2026 21:40
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

Successfully merging this pull request may close these issues.

2 participants