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

add gradle plugin for linking to sqlite3 #18

Closed
05nelsonm opened this issue Sep 20, 2023 · 2 comments · Fixed by #46
Closed

add gradle plugin for linking to sqlite3 #18

05nelsonm opened this issue Sep 20, 2023 · 2 comments · Fixed by #46

Comments

@05nelsonm
Copy link
Collaborator

So, SQLDelight gradle plugin option linkSqlite will loop through all binaries and add to linkerOpts -lsqlite3. This means that the libs from SQLiter and SQLDelight will be linked, instead. Need to change the static lib build such that the object name is sqlite3mc.o, and then add linkerOpts -lsqlite3mc.

A gradle plugin will be necessary for consumers to apply which will automatically configure their SQLDelight extension which will

  • set linkSqlite to false
  • after evaluation, will addlinkerOpts -lsqlite3mc to all kotlin native binaries
@05nelsonm
Copy link
Collaborator Author

No longer needed as of #37

@05nelsonm
Copy link
Collaborator Author

Reopening. Need to now add link for -framework Security for apple targets. Plus, will be good to have so in the future, any other link options can be automatically had for that version release.

                targets.filterIsInstance<KotlinNativeTarget>()
                    .filter { it.konanTarget.family.isAppleFamily }
                    .flatMap { it.binaries }
                    .forEach { compilationUnit ->
                        compilationUnit.linkerOpts("-framework", "Security")
                    }

@05nelsonm 05nelsonm reopened this Oct 3, 2023
This was referenced Oct 3, 2023
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 a pull request may close this issue.

1 participant