Skip to content

Add feature flags allowing for statically linking to libclang #413

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hdoordt
Copy link

@hdoordt hdoordt commented Apr 7, 2025

When building redis-module, on Alpine 3, a linker error occurs when trying to dynamically link libclang, a dependency of bindgen:

[...] Dynamic loading not supported

This can be worked around by statically linking to libclang. This PR allows users of this crate to enable static linking.

When building `redis-module`, on Alpine 3, a linker error
occurs when trying to dynamically link libclang, a dependency
of bindgen:

```
[...] Dynamic loading not supported
```

This can be worked around by statically linking to libclang.
This PR allows users of this crate to enable static linking.
Copy link

@Copilot 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.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

Cargo.toml:150

  • The default feature flag currently enables dynamic linking (bindgen-runtime), which may contradict the PR's goal of providing a static linking option on Alpine 3. Consider switching the default to 'bindgen-static' or updating the documentation to clearly explain the intended behavior.
+default = ["min-redis-compatibility-version-6-0", "bindgen-runtime"]

@hdoordt
Copy link
Author

hdoordt commented Apr 8, 2025

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)

Cargo.toml:150

* The default feature flag currently enables dynamic linking (bindgen-runtime), which may contradict the PR's goal of providing a static linking option on Alpine 3. Consider switching the default to 'bindgen-static' or updating the documentation to clearly explain the intended behavior.
+default = ["min-redis-compatibility-version-6-0", "bindgen-runtime"]

The default is set to runtime linking to avoid breaking existing builds.

@hdoordt hdoordt requested a review from Copilot April 14, 2025 09:37
Copy link

@Copilot 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.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

Cargo.toml:150

  • The default feature set includes 'bindgen-runtime' (dynamic linking) even though the PR aims to allow static linking to libclang as a workaround for Alpine. Confirm if this is the intended default behavior or consider switching to 'bindgen-static' for affected platforms.
default = ["min-redis-compatibility-version-6-0", "bindgen-runtime"]

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.

1 participant