build: use indirect ccall mode in multik-openblas cinterop#320
Merged
build: use indirect ccall mode in multik-openblas cinterop#320
Conversation
Contributor
There was a problem hiding this comment.
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-targetlibmultikcinterop configuration inmultik-openblas.
f1eae23 to
26d9f49
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
extraOpts("-Xccall-mode", "indirect")to the host-target cinterop block inmultik-openblas.-Xccall-mode indirectswitches Kotlin/Native C-call generation to indirect dispatch (function-pointer lookup) instead of the directccallmode. This decouples the Kotlin/Native consumer from direct link-time symbol resolution against OpenBLAS and themultik_jniC++ sources — resolution happens at runtime.Test plan
./gradlew :multik-openblas:compileKotlinMacosArm64— BUILD SUCCESSFUL on macOS ARM64 host../gradlew assemble— BUILD SUCCESSFUL../gradlew :multik-openblas:compileKotlinLinuxX64with-Pmultik.mainHost=false).